SiteParam

Th' siteparam shortcode prints values o' ship params.

Usage

While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' use positional aswell or call this shortcode from yer own partials.

{{% 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 from hugo.toml

`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:

[marrrkup.goldmark.renderer]
    unsafe = true
[params]
    [params.siteparam.test]
        text = "A **nested** parameter <b>with</b> formatting"
Formatted parameter: {{% siteparam name="siteparam.test.text" %}}

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