Admonition Extension
Overview
Creates block-styled side content. Based on Admonition Extension, Material for MkDocs (Personal opinion: Material for MkDocs is eye-candy. If you have not taken a look at it, you are missing out on a visual treat.).
Syntax
Block-Styled Side Content
!!! qualifier "Optional Title"
block content
No-Heading Content
!!! qualifier ""
block content
Collapsible Block-Styled Side Content:
Collapsed by default
??? qualifier "Optional Title"
block content
Open by default
???+ qualifier "Optional Title"
block content
SVG images and stylesheet included for default qualifiers. User definable qualifiers can be added by specifying recognized style qualifiers, their aliases and image mapping.
Qualifiers are used to select the icon and the color of the block.
|
|
Parsing Details
Use class AdmonitionExtension from artifact flexmark-ext-admonition.
Defined in AdmonitionExtension class:
CSS and JavaScript must be included in your page
Default CSS and JavaScript are contained in the jar as resources:
Their content is also available by calling AdmonitionExtension.getDefaultCSS() and
AdmonitionExtension.getDefaultScript() static methods.
The script should be included at the bottom of the body of the document and is used to toggle open/closed state of collapsible admonition elements.
The following options are available:
Defined in AdmonitionExtension class:
| Static Field | Default Value | Description |
|---|---|---|
| CONTENT_INDENT | 4 |
indent for child nodes |
| ALLOW_LEADING_SPACE | true |
if non-indenting leading space allowed before opening marker |
| INTERRUPTS_PARAGRAPH | true |
if false then blank line required before |
| INTERRUPTS_ITEM_PARAGRAPH | true |
if false then blank line required before in list items |
| WITH_SPACES_INTERRUPTS_ITEM_PARAGRAPH | true |
whether having a leading non-indenting space requires blank line before in list item |
| ALLOW_LAZY_CONTINUATION | true |
if true then first paragraph can be lazy, otherwise requires content indent |
| UNRESOLVED_QUALIFIER | "note" |
type to use when qualifier is not known |
| QUALIFIER_TYPE_MAP | see below | mapping of qualifier to type |
| QUALIFIER_TITLE_MAP | see below | mapping of qualifier to default title, when title is not specified |
| TYPE_SVG_MAP | see below | mapping of type to svg for the icon |