Admonitions highlight a particular block of text that exists slightly apart from the narrative of your page, like so:
Specification¶
Admonition node for drawing attention to text, separate from the neighboring content
- type: string, (“admonition”)
- See also Node
- kind: string, optional, (“attention” | “caution” | “danger” | “error” | “hint” | “important” | “note” | “seealso” | “tip” | “warning”)
- kind of admonition, to determine styling
- class: string, optional
- admonition class info to override kind
- children: array, optional, (AdmonitionTitle | FlowContent)
- An optional
admonitionTitle
followed by the admonitions content. - position: object, optional, (Position)
- See also Node
- data: object, optional
- See also Node
Example¶
Markup
AST
Render
```{admonition} This is a title
An example of an admonition with a _title_.
```
type: root
children:
- type: mystDirective
name: admonition
args: This is a title
value: An example of an admonition with a _title_.
children:
- type: admonition
children:
- type: admonitionTitle
children:
- type: text
value: This is a title
- type: paragraph
children:
- type: text
value: 'An example of an admonition with a '
- type: emphasis
children:
- type: text
value: title
- type: text
value: .