Back to Hugo

Param

docs/content/en/methods/site/Param.md

0.161.1426 B
Original Source

The Param method on a Site object is a convenience method to return the value of a user-defined parameter in your project configuration.

{{< code-toggle file=hugo >}} [params] display_toc = true {{< /code-toggle >}}

go-html-template
{{ .Site.Param "display_toc" }} → true

The above is equivalent to either of these:

go-html-template
{{ .Site.Params.display_toc }}
{{ index .Site.Params "display_toc" }}