mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
894 B
Executable File
894 B
Executable File
title, description, categories, keywords
| title | description | categories | keywords |
|---|---|---|---|
| Param | Insert a parameter from front matter or site configuration into your content using the param shortcode. |
{{< note >}}
To override Hugo's embedded param shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
[source code]: {{% eturl param %}} {{< /note >}}
The param shortcode renders a parameter from front matter, falling back to a site parameter of the same name. The shortcode throws an error if the parameter does not exist.
---
title: Example
date: 2025-01-15T23:29:46-08:00
params:
color: red
size: medium
---
We found a {{%/* param "color" */%}} shirt.
Hugo renders this to:
<p>We found a red shirt.</p>
Access nested values by chaining the identifiers:
{{%/* param my.nested.param */%}}