Mkdocs
admonition¶
https://squidfunk.github.io/mkdocs-material/extensions/admonition/
usage¶
Admonitions follow a simple syntax: every block is started with
!!!
, followed by a single keyword which is used as the type qualifier of the block. The content of the block then follows on the next line, indented by four spaces.
qualifier | comment |
---|---|
!!! note | note |
!!! note "Phasellus posuere in sem ut cursus" | customized title |
!!! note "" | no title |
Embedded content¶
Admonitions can contain all kinds of text content, including headlines, lists, paragraphs and other blocks – except code blocks, because the parser from the standard Markdown library does not account for those. The PyMdown Extensions package adds an extension called SuperFences, which makes it possible to nest code blocks within other blocks, respectively Admonition blocks.
qualifier | |
---|---|
!!! note/seealso | - pymdownx.superfences |
Collapsible blocks¶
The Details extension which is also part of the PyMdown Extensions package adds support for rendering collapsible Admonition blocks. This is useful for FAQs or content that is of secondary nature.
qualifier | |
---|---|
??? note "Phasellus posuere in sem ut cursus" | Collapsible blocks |
type¶
Admonition supports user-defined type qualifiers which may influence the style of the inserted block. Following is a list of type qualifiers provided by Material for MkDocs, whereas the default type, and thus fallback for unknown type qualifiers, is note.
qualifier | |
---|---|
!!! note/seealso | |
!!! abstract/summary/tldr | Abstract |
!!! info/todo | info |
!!! tip/hint/important | tip |
!!! success/check/done | success |
!!! question/help/faq | question |
!!! warning/caution/attention | warning |
!!! failure/fail/missing | failure |
!!! danger/error | |
!!! bug | |
!!! example | |
!!! quote/cite |