Callouts
Hugo Blox supports GitHub and Obsidian-style Markdown callouts for maximum compatibility and content portability.
Callouts are a useful feature to draw attention to important or related content such as notes, hints, or warnings in your articles.
Usage
Basic Callout Types
Hugo Blox supports all 15+ callout types from Obsidian’s documentation:
Information & Notes:
1> [!NOTE]
2> This is a note callout with important information that users should know.
This is a note callout with important information that users should know.
1> [!INFO]
2> Alternative info callout - same styling as NOTE.
Alternative info callout - same styling as NOTE.
1> [!ABSTRACT]
2> Use for abstracts, summaries, or TL;DR sections.
Use for abstracts, summaries, or TL;DR sections.
Actions & Tasks:
1> [!TODO]
2> This is something that needs to be done.
This is something that needs to be done.
1> [!TIP]
2> Here's a helpful tip to make your workflow more efficient!
Here’s a helpful tip to make your workflow more efficient!
1> [!SUCCESS]
2> Great job! This operation completed successfully.
Great job! This operation completed successfully.
Questions & Interactive:
1> [!QUESTION]
2> What do you think about this approach? Let us know!
What do you think about this approach? Let us know!
1> [!EXAMPLE]
2> Here's a practical example of how to implement this feature.
Here’s a practical example of how to implement this feature.
1> [!QUOTE]
2> "The best way to predict the future is to invent it." - Alan Kay
“The best way to predict the future is to invent it.” - Alan Kay
Warnings & Errors:
1> [!WARNING]
2> Be careful! This action might have unexpected consequences.
Be careful! This action might have unexpected consequences.
1> [!CAUTION]
2> Danger! This operation is irreversible and could cause data loss.
Danger! This operation is irreversible and could cause data loss.
1> [!IMPORTANT]
2> This is critical information that users must understand to proceed.
This is critical information that users must understand to proceed.
1> [!DANGER]
2> This is extremely dangerous - proceed with extreme caution!
This is extremely dangerous - proceed with extreme caution!
1> [!FAILURE]
2> This operation failed. Check your configuration and try again.
This operation failed. Check your configuration and try again.
1> [!BUG]
2> Known issue: This feature doesn't work properly in Safari < 14.
Known issue: This feature doesn’t work properly in Safari < 14.
Custom Titles
You can customize the title of any callout:
1> [!WARNING]+ Custom Warning Title
2> This warning has a custom title instead of just "Warning".
This warning has a custom title instead of just “Warning”.
Legacy Syntax (Deprecated)
The old shortcode syntax still works but shows a deprecation warning:
1{{< callout note >}}
2This still works but is deprecated. Use the Markdown syntax above!
3{{< /callout >}}
CSS Customization
Hugo Blox generates callouts with semantic CSS classes and data attributes, making customization easy. Each callout has:
- Base class:
.callout - Type-specific data attribute:
data-callout="note" - Component classes:
.callout-icon,.callout-title,.callout-content,.callout-body
Custom CSS Example (add to your assets/css/custom.css):
1/* Customize NOTE callouts */
2.callout[data-callout="note"] {
3 border-left-width: 8px;
4 box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
5}
6
7/* Make SUCCESS callouts pulse */
8.callout[data-callout="success"] {
9 animation: pulse 2s infinite;
10}
11
12/* Custom icon styling */
13.callout-icon svg {
14 transition: transform 0.2s;
15}
16
17.callout:hover .callout-icon svg {
18 transform: scale(1.1);
19}
20
21/* Dark mode overrides */
22@media (prefers-color-scheme: dark) {
23 .callout[data-callout="warning"] {
24 background-color: rgb(92 25 2);
25 border-color: rgb(245 158 11);
26 }
27}
This approach matches Obsidian’s CSS customization system, ensuring your styles work across platforms.
Benefits of the New Syntax
- Portable: Works with GitHub, Obsidian, and other Markdown editors
- Standard: Uses widely-adopted Markdown callout syntax
- Clean: No Hugo-specific shortcodes needed
- Future-proof: Supported by the latest Hugo versions (0.132.0+)
- Customizable: Semantic CSS classes and data attributes for easy styling
- Complete: All 15+ Obsidian callout types supported
- Multilingual: Callout titles are automatically translated based on your site’s language (and can be customized in the language packs)