prod.html

Occasionally it is useful to use a variable that represents your product name — especially when documenting a project or startup product that is likely to undergo rebranding.

How it Works

The {{<prod>}} shortcode prints out a string for your main product name defined in your site configuration.

  1. Open your repo.
  2. Navigate to the themes/milo/hugo.yaml file.
  3. Update the following:
    # Theme Feature Settings
    params: 
      names:
        product: 'Milo Docs'
Header Constraints for TOCs

To ensure Hugo resolves this shortcode correctly in the Table of Contents of your articles, make sure that you use the % wrapper instead of < > in your headers.

Example Error Output: HAHAHUGOSHORTCOD...

Examples

This is the MiloDocs theme.

This is the {{<prod>}} theme.

Source Code

{{- with .Site.Params.names.product}}{{.}}{{end}}