Markdown Callouts

0.4.0 · active · verified Fri Apr 17

markdown-callouts is a Python-Markdown extension that enhances documentation with admonition-style callouts. It supports various syntaxes, including a flexible original style (e.g., `NOTE:`), collapsible blocks (`>? TIP:`), and the GitHub 'alerts' syntax (`> [!NOTE]`). The current version is 0.4.0, and new features are added incrementally, often focusing on compatibility with existing Markdown parsers and popular documentation tools like MkDocs.

Common errors

Warnings

Install

Imports

Quickstart

To use markdown-callouts, enable the desired extensions in your `mkdocs.yml` file (for MkDocs projects) or pass them to the `extensions` parameter when initializing the `markdown.Markdown` parser in Python. The example demonstrates common usage within an MkDocs project.

# mkdocs.yml
site_name: My Docs

markdown_extensions:
  - callouts
  - github-callouts # For GitHub-style alerts, v0.4.0+

# docs/index.md content example:
# NOTE: This is a standard callout.
# 
# > [!WARNING]
# > This is a GitHub-style alert.
# 
# >? TIP: **Click me for more info.**
# >
# > This content is collapsible.

view raw JSON →