mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 07:19:09 -04:00
Document front matter params expected by embedded templates
This commit is contained in:
parent
8a12d3c48a
commit
f4628189a6
@ -282,6 +282,21 @@ Access these values from a template using the [`Params`] or [`Param`] method on
|
||||
[`param`]: /methods/page/param/
|
||||
[`params`]: /methods/page/params/
|
||||
|
||||
Hugo provides [embedded templates] to optionally insert meta data within the `head` element of your rendered pages. These embedded templates expect the following front matter parameters:
|
||||
|
||||
Parameter|Data type|Used by these embedded templates
|
||||
:--|:--|:--
|
||||
`audio`|`[]string`|[`opengraph.html`]
|
||||
`images`|`[]string`|[`opengraph.html`], [`schema.html`], [`twitter_cards.html`]
|
||||
`videos`|`[]string`|[`opengraph.html`]
|
||||
|
||||
The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected.
|
||||
|
||||
[`opengraph.html`]: {{% eturl opengraph %}}
|
||||
[`schema.html`]: {{% eturl schema %}}
|
||||
[`twitter_cards.html`]: {{% eturl twitter_cards %}}
|
||||
[embedded templates]: /templates/embedded/
|
||||
|
||||
## Taxonomies
|
||||
|
||||
Classify content by adding taxonomy terms to front matter. For example, with this site configuration:
|
||||
|
Loading…
x
Reference in New Issue
Block a user