markdown-callouts
Extension for Python-Markdown: a classier syntax for admonitions
Installation
pip install markdown-callouts
If using MkDocs, enable the extension in mkdocs.yml:
markdown_extensions:
- callouts
Continue to the documentation site.
Usage
This adds a new block-level syntax to Markdown, to put a paragraph of text into a block that's specially highlighted and set apart from the rest of the text.
Example:
NOTE: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Result, using mkdocs-material:
Collapsible blocks also have a syntax for them:
>? NOTE: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
> nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
> massa, nec semper lorem quam in massa.
This instead shows up as an initially-closed <details> block.
Graceful degradation
This extension produces the same results as the admonition extension, but with a syntax that is much less intrusive and has a very reasonable fallback look for "vanilla" renderers.
E.g. compare what you would've seen above if we actually wrote that Markdown and fed it to GitHub's Markdown parser:
| "Callouts" syntax |
|---|
|
NOTE: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa. |
| "Admonition" syntax |
|
!!! note
|
Continue to the documentation site.
Metadata
Release files for markdown-callouts 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| markdown_callouts-0.4.0.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markdown_callouts-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / markdown_callouts-0.4.0.tar.gz
| Download URL | markdown_callouts-0.4.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ed2c90486967058a73a547781121983839522d67041ae52c4979616f1b2b746
|
|
BLAKE2b-256 checksum How to use checksums |
8773ae5aa379f6f7fea9d0bf4cba888f9a31d451d90f80033ae60ae3045770d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / markdown_callouts-0.4.0-py3-none-any.whl
| Download URL | markdown_callouts-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed0da38f29158d93116a0d0c6ecaf9df90b37e0d989b5337d678ee6e6d6550b7
|
|
BLAKE2b-256 checksum How to use checksums |
1db57b0a0a52c82bfccd830af2a8cc8add1c5bc932e0204922434954a631dd51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|