Admonitions
Generic Admonitions
Admonition Title
This is an admonition with the note class.
This is outside of the admonition
Custom Admonition Classes
This is an admonition with a custom class. You can add icons for custom admonition classes
and override predefined classes by setting the readme_admonition_icons
confval
Overriding Predefined Icons for Default Admonition Classes
This is an admonition with the danger
class.
However, the icon has been overridden to use “😱” instead of the default value of “☣”
Admonition Without a Class
This is an admonition with no class. It uses the readme_default_admonition_icon
as an icon
Admonition With an Undefined Class
This is an admonition with a class that’s not in the readme_admonition_icons
mapping.
Since the icon can’t be found, it uses the readme_default_admonition_icon
.
Specific Admonitions
The default specific admonitions are any of: “attention”, “caution”, “danger”, “error”, “hint”, “important”, “note”, “tip”, “warning”
Attention
Attention!
Caution
Caution!
Danger
Danger!
This should also use the overridden icon.
Error
Error!
Hint
Hint!
Important
Important!
Note
Note!
Tip
Tip!
Warning
Warning!
Tip
This is a multi-line tip!
Here’s the second line.
This is outside the admonition
Warning
This is a single line warning written on multiple lines. There is no blank line before the second line!
Note
This is a note admonition. The content is two lines below the directive.
Attention
This is an attention admonition. The content is directly below the directive.
Nested Admonitions
Admonition Title
This is a generic admonition with the note class.
The admonition text is multiple lines long.
Nested Admonitions
Nested admonitions are admonitions that are nested.
This is back in the original admonition
This is outside of the admonition
Admonition Title
This is a generic admonition with the tip class.
The admonition text is multiple lines long.
Important
This is a nested specific admonition.
It’s nested.
This is back in the original admonition
This is outside of the admonition
Hint
This is a specific admonition.
Here is another line.
Caution
This is a nested specific admonition.
It’s nested within another specific admonition.
This is back in the original admonition
This is outside of the admonition
Hint
This is a specific admonition.
Here is another line.
This is a nested generic admonition.
It’s nested within the specific admonition.
This is back in the original admonition
This is outside of the admonition
Admonitions in Only Directives
End of file nested admonition
Hint
blah
Hint
this nested admonition is at the end of the file with no newline after it