oprypin / markdown-callouts

Markdown extension: a classier syntax for admonitions
https://oprypin.github.io/markdown-callouts
MIT License
29 stars 13 forks source link

Custom callouts #2

Closed aahnik closed 3 years ago

aahnik commented 3 years ago

Currently, only 4 callouts are supported. IMPORTANT: TIP: INFO: NOTE:

I propose the callout syntax to be changed to

> **Tip** This is a tip

Tip This is a tip

Any name should be allowed in callouts. Also, a custom logo will be great.

Like

📢 Announcement This is an announcement.

The emoji needs to be translated to the nearest possible logo in mkdocs, if not available, use the emoji directly.


I am interested in implementing this. But don't know where to start. Any link would be really helpful. In the meantime, I am searching.

oprypin commented 3 years ago

Currently, only 4 callouts are supported. IMPORTANT: TIP: INFO: NOTE:

That's not true, any uppercase word works.

Also, a custom logo will be great.

You can fully customize it via CSS, for example see mkdocs-material theme Documentation: https://squidfunk.github.io/mkdocs-material/reference/admonitions/#custom-admonitions How I used it: https://github.com/mkdocstrings/crystal/commit/53db1592e771eb0d918b1aafbd52eb7111479f75#diff-607e5fcb5247b2ab8b856864d7dc86fa66f24d82cb5b7ef2269a522344b650e2 https://mkdocstrings.github.io/crystal/extras.html#callouts-extension

oprypin commented 3 years ago

I think I answered the main part. Fully custom titles will be tracked in issue https://github.com/oprypin/markdown-callouts/issues/4 instead.