Obsidian callouts for Python-Markdown
This is an extension for Python-Markdown which allows you to use Obsidian-style callouts:
> [!warning]
> Here's a callout block.
> [!tip] Callouts can have custom titles
> Like this one.
It will be rendered kinda like this:
Warning
Here's a callout block.
[!TIP] Callouts can have custom titles Like this one.
For a full reference, please, see the Obsidian's documentation on this.
Simply enable the extension like this:
import markdown
md = markdown.Markdown(extensions=['obsidian_callouts'])
print(md.convertFile('page.md'))
It can be used with MkDocs as following:
# mkdocs.yml
markdown_extensions:
- obsidian_callouts
It is also installed along with my mkdocs-obsidian-bridge.
During the implementation of this plugin, I was using the official Python-Markdown as an inspiration and the example.