Hugo has several built-in shortcodes.
Lets go over them here:
- Takes the user and gist ID as parameters and renders a GitHub gist. You can also pass a filename if the gist has multiple files.
- Takes a file path in the Hugo website and provides an absolute link to that file. If the url or slug is overridden in the front matter of a page, the ref shortcode follows the newly provided location.
<a href="https://example.com/blog/neat"> Neat <//a>
- Provides the relative link to the file in the Hugo website.
This shortcode works similar to ref.
- Renders an image with a caption.
- Renders a Tweet with the given ID.
- Embeds an Instagram image with the given ID.
- Renders a Vimeo video with the given ID.
- Renders a YouTube video with the given ID.
- Adds syntax highlighting for the provided source code.
- Prints a passed parameter (useful for debugging purposes as well).