hugo-theme-relearn/exampleSite/content/shortcodes/siteparam.en.md
2022-06-23 00:03:24 +02:00

1.1 KiB

+++ description = "Get value of site params" title = "Site param" +++

The siteparam shortcode prints values of site params.

Usage

While the examples are using shortcodes with named parameter you are free to use positional aswell or call this shortcode from your own partials.

{{< tabs groupId="shortcode-parameter">}} {{% tab name="shortcode" %}}

{{%/* siteparam name="editURL" */%}}

{{% /tab %}} {{% tab name="shortcode (positional)" %}}

{{%/* siteparam "editURL" */%}}

{{% /tab %}} {{% tab name="partial" %}}

{{ partial "shortcodes/siteparam.html" (dict
  "context" .
  "name" "editURL"
)}}

{{% /tab %}} {{< /tabs >}}

Parameter

Name Position Default Notes
name 1 <empty> The name of the site param to be displayed.

Examples

editURL from config.toml

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

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