Maintenance: Hugo (Built-in) Shortcode Resources


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

Hugo Documentation

  • figure - Generates an HTML 5 figure, takes keyword parameters including src, link, target, rel, alt, title, caption, class, height, width, loading, attr, and attrlink.
  • 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)

github.com/gohugoio/…

  • 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)

github.com/spf13/…

  • 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)

History

EDSkinner.net began in 2023. Fiction and non-fiction publications are included as well as (blog) posts and supplemental materials from flat5.net (2004-present).

Comments submitted on individual pages are subject to approval. General suggestions may be sent via the Contact page.

© Copyright 2024 by E D Skinner, All rights reserved