Maintenance: Hugo (Built-in) Shortcode Resources
- Posted: 7/11/23 (revised: 1/23/24)
- Category: Maintenance Software
- Topics: Hugo Website
Disclaimer: Maintenance pages are for those who update this website. Nonetheless, everyone is free to look.
Few of these shortcodes are used on this website. They are documented here merely for completeness.
For shortcodes and partials unique to and used by this website, see Partials and Shortcodes.
gohugo.io: Built-In Shortcodes
- figure - Generates an HTML 5 figure, takes keyword parameters including
src
,link
,target
,rel
,alt
,title
,caption
,class
,height
,width
,loading
,attr
, andattrlink
. - gist - Display a gist (short example) from github
- highlight - Insert and syntax-highlight code in languages
- {{< readfile file=“content/workstation/reusable/md/example.md” >}}
- {{< readfile file=“content/workstation/reusable/html/example.html” html=“true” >}}
- {{< readfile file=“content/workstation/reusable/rb/example.rb” highlight=“ruby” >}}
- {{< readfile file=“content/workstation/reusable/json/example.json” highlight=“json” >}}
- instagram - ? Displays an Instagram post?
- param - Fetches a post’s (frontmatter) parameter, or from the Site paramters
- ref - Returns the permalink for a file (such as
posts/meat.md
) - relref - Returns a relative permalink for a file (such as
posts/meat.md
) - tweet - Displays a tweet
- vimeo - Embeds a vimeo video (player)
- youtube - Embeds a youtube video (player)
github.com Documentation Helpers Used by Hugo Itself (not built-in)
- chroma-lexers - Renders a dictionary list (from .Site.Data.docs.chroma.lexers)
- code-toggle - Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats
- code - Renders syntax-highlighted code
- datatable-filtered - Renders a table after filtering (from .Site.Data.docs)
- datatable - Renders a table (from .Site.Data.docs)
- funcsig - Renders a function signature
- getcontent - Gets content from a headless bundle (file)
- gomodules-info - Renders an “Admoninition Aside” from built-in text
- imgproc - Implements image Crop, Fit, Fill and Resize operations for a figure
- module-mounts-note - Text with a link re “Module Mounts” configuration
- new-in - Generates a button with a link to “New in version X” text
- page-kinds - Table that lists the five “kinds” of Hugo things (home, page, section, taxonomy, and term)
- readfile - Inserts a file with options “markdown” and “highlight”
- todo - Wrapper for text
spf13 (not built-in)
- gslides - ?
- img - Figures with all the bells and whistles
- oldyoutube - Youtube player (1 of 2, see
youtube
below) - scribd - Scribd?
- slideshare - Slideshare.net something
- speakerdeck - Speakerdeck.com something
- vimeo - Vimeo player
- youtube - Youtube player (2 of 2, see
oldyoutube
above)