SiteParam

Th' siteparam shortcode prints values o' params contained 'n yer hugo.toml.

Usage

{{% siteparam name="editURL" %}}
{{% siteparam "editURL" %}}
{{ partial "shortcodes/siteparam.html" (dict
  "page" .
  "name" "editURL"
)}}

Parameter

Name Posit'n Default Notes
name 1 <empty> Th' name o' th' ship param t' be displayed.

Examples

editURL

`editURL` value: {{% siteparam name="editURL" %}}

editURL value: https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}

Nested Parameter wit' Marrrkdown an' HTML Formatt'n

T' use formatted parameter, add this 'n yer hugo.toml:

hugo.
[marrrkup]
  [marrrkup.goldmark]
    [marrrkup.goldmark.renderer]
      unsafe = true
marrrkup:
  goldmark:
    renderer:
      unsafe: true
{
   "markup": {
      "goldmark": {
         "renderer": {
            "unsafe": true
         }
      }
   }
}

Now values contain'n Marrrkdown will be formatted correctly.

hugo.
[params]
  [params.siteparam]
    [params.siteparam.test]
      text = 'A **nested** parameter <b>with</b> formatting'
params:
  siteparam:
    test:
      text: A **nested** parameter <b>with</b> formatt'n
{
   "params": {
      "siteparam": {
         "test": {
            "text": "A **nested** parameter \u003cb\u003ewith\u003c/b\u003e formatting"
         }
      }
   }
}
Formatted parameter: {{% siteparam name="siteparam.test.text" %}}

Formatted parameter: A nested opt'n <b>with</b> formatt'n