You can extend the functionality of Markdown in Hugo with shortcodes. Shortcodes are special templates that are called when a shortcode is used inside the content body.
They can be used to add custom markup, format text, generate HTML elements, or pull in data from external sources.
Using Shortcodes in Forestry
You can use Forestry Snippets to configure shortcodes in the editor. You can also use Hugo shortcodes directly, in the format Hugo requires them in the content file.
For example, using Hugo’s built-in figure shortcode, a user may enter the following into the content body:
This could be configured as a Forestry snippet for ease of use.
Hugo ships with a collection of built-in shortcodes for modifying the output of your content body.
Hugo also allows you to build your own shortcodes.
Caught a mistake or want to contribute to the docs? Edit this page on Github!