Skip to main content

Markdown extension: a classier syntax for admonitions

Project description

markdown-callouts

Extension for Python-Markdown: a classier syntax for admonitions

PyPI GitHub GitHub Workflow Status

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:

Screenshot

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

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.

Continue to the documentation site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown-callouts-0.3.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

markdown_callouts-0.3.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file markdown-callouts-0.3.0.tar.gz.

File metadata

  • Download URL: markdown-callouts-0.3.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.5 CPython/3.10.6

File hashes

Hashes for markdown-callouts-0.3.0.tar.gz
Algorithm Hash digest
SHA256 21e99d72a879663343e232158413e12eeaa9fb78b90e669f41cdbf0962a364fb
MD5 dec904e241eeccb328a7e446f1195fd7
BLAKE2b-256 497f0baf428f7f0cc646289fd04a9be12f9992fe01eb69a9e48a8891dcb4d162

See more details on using hashes here.

File details

Details for the file markdown_callouts-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: markdown_callouts-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.5 CPython/3.10.6

File hashes

Hashes for markdown_callouts-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d58e8bd244366d2a5ca549b1971f4caac3036469c243856eb886364f71c013b
MD5 a90e9f89c77a9438584356068c521d15
BLAKE2b-256 71d8a65d01fe6b838fbc2ac3aaaeb12b7eafdb04ef980392c8a2357e2ceeec4c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page