Edit on GitHub
Shortcodes Reference & Usage Guide
Built-In Shortcodes
There are many built-in shortcodes in Hugo, you can see them here: https://gohugo.io/content-management/shortcodes/#embedded
Custom Shortcodes
Downloads
Used to insert the downloads HTML segment into the page. Do not use this on any page but the downloads page.
Example usage
{{< downloads >}}
Style
Adds an additional div with customizable class.
Example:
{{< style "button" >}}
Hello World
{{</ style >}}
Obsidian Style Alerts
Supported categories: note
, important
, info
, caution
, warning
, tip
Examples:
> [!note]
> This is a note alert.
Note This is a note alert.
> [!info]- Informational Title
> This is some informational text.
Informational Title
This is some informational text.
> [!important]
> Always comment your code
Important Always comment your code
> [!tip]- Best Starting Move
> 1. a3
Best Starting Move
- a3
> [!warning]- You Read This First
> and this second
You Read This First
and this second
> [!caution]
> Be careful with this step.
Caution Be careful with this step.
> [!tip]+ Best Practice
> Use strong passwords.
Best Practice
Use strong passwords.
Deprecated Shortcodes
Chess Diagram
Note Currently does not work
Chess Game
Note Currently does not work
File
Used in 2018 Blog Posts to place images, no longer needed with modern Hugo.
Example:
[]({{< file "Capture.PNG" >}})
Last Updated: 2025-09-03