Description
Admonitions
Callouts, or “admonitions”, highlight a particular block of text that exists slightly apart from the narrative of your page, such as a note or a warning.
Kind | Link |
---|---|
Reference | https://mystmd.org/guide/directives#directive-admonition |
Documentation | https://mystmd.org/guide/admonitions |
Implementation
- Parses directives and aliases
- Emits HTML
- Unit tests
- Validation (emits, warnings and errors).
Specification compliance:
- Arguments is parsed
- Body is parsed
- Options:
-
label, name
(string) - Label the admonition to be cross-referenced or explicitly linked to. -
enumerated, numbered
(boolean) - Turn on/off the numbering for the specific admonition -
enumerator, number
(string) - Explicitly set the admonition number - class (string) - CSS classes to add to your admonition. Special classes include:
-
dropdown
- turns the admonition into a<details>
html element -
simple
- an admonition with “simple” styles - the name of an admonition (if no directive alias is used)
-
-
icon
(boolean) - Setting icon to false will hide the icon. - open (boolean) - Turn the admonition into a dropdown, and set the open state.
-
- Aliases:
- attention
- caution
- danger
- error
- important
- hint
- note
- seealso
- tip
- warning
- .callout-note
- .callout-warning
- .callout-important
- .callout-tip
- .callout-caution