Admonition type syntax¶
Admonition type syntax refers to the markdown-based code block structure used to create styled callout blocks, typically within tools like the Obsidian Admonition plugin.^[600-developer-tools-obsidian-obsidian-admonition.md]
Syntax Structure¶
Admonitions are created using a fenced code block format.^[600-developer-tools-obsidian-obsidian-admonition.md] The syntax begins with three backticks followed by the ad- prefix and a specific type identifier (e.g., ad-note).^[600-developer-tools-obsidian-obsidian-admonition.md] Inside the block, metadata keys such as title, collapse, icon, and color can be defined to customize the appearance and behavior of the box.^[600-developer-tools-obsidian-obsidian-admonition.md]
Generic Template¶
```ad-<type>
title: # Admonition title.
collapse: # Create a collapsible admonition.
icon: # Override the icon.
color: # Override the color.
Content goes here...
Supported Types¶
The syntax supports various types that dictate the icon and default styling of the block.^[600-developer-tools-obsidian-obsidian-admonition.md] Common types demonstrated in the source material include:
ad-note: Used for general notes or standard information.^[600-developer-tools-obsidian-obsidian-admonition.md]ad-question: Typically formatted to display questions, with support for thecollapse: closemetadata to hide content by default.^[600-developer-tools-obsidian-obsidian-admonition.md]ad-bug: Styled specifically for reporting bugs or errors.^[600-developer-tools-obsidian-obsidian-admonition.md]ad-warning: Used for warning messages, often collapsible.^[600-developer-tools-obsidian-obsidian-admonition.md]
Nesting¶
The syntax allows for admonitions to be nested within one another.^[600-developer-tools-obsidian-obsidian-admonition.md] This is achieved by placing a complete admonition code block inside the content area of a parent admonition block.^[600-developer-tools-obsidian-obsidian-admonition.md]
Related Concepts¶
- [[Obsidian]]
- [[Markdown]]
Sources¶
600-developer-tools-obsidian-obsidian-admonition.md