mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
964 B
964 B
title | linkTitle | description | categories | keywords | menu | function | relatedFunctions | aliases | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
collections.EchoParam | echoParam | Prints a parameter if it is set. |
|
|
|
|
For example, consider this site configuration:
{{< code-toggle file=hugo copy=false >}} [params.footer] poweredBy = 'Hugo' {{< /code-toggle >}}
To print the value of poweredBy
:
{{ echoParam site.Params.footer "poweredby" }} → Hugo
{{% note %}}
When using the echoParam
function you must reference the key using lower case. See the previous example.
The echoParam
function will be deprecated in a future release. Instead, use either of the constructs below.
{{% /note %}}
{{ site.Params.footer.poweredBy }} → Hugo
{{ index site.Params.footer "poweredBy" }} → Hugo