mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 22:04:39 -04:00
parent
38a15e6f7d
commit
bae2403551
@ -64,6 +64,9 @@ aliases
|
|||||||
audio
|
audio
|
||||||
: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
|
: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.
|
||||||
|
|
||||||
|
cascade
|
||||||
|
: a map of Front Matter keys whose values are passed down to the page's descendents unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details.
|
||||||
|
|
||||||
date
|
date
|
||||||
: the datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behaviour is configurable.
|
: the datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behaviour is configurable.
|
||||||
|
|
||||||
@ -152,6 +155,22 @@ include_toc: true
|
|||||||
show_comments: false
|
show_comments: false
|
||||||
{{</ code-toggle >}}
|
{{</ code-toggle >}}
|
||||||
|
|
||||||
|
## Front Matter Cascade
|
||||||
|
|
||||||
|
Any node or section can pass down to descendents a set of Front Matter values as long as defined underneath the reserved `cascade` Front Matter key.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```yaml
|
||||||
|
# content/blog/_index.md
|
||||||
|
title: Blog
|
||||||
|
cascade:
|
||||||
|
banner: images/typewriter.jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
With the above example the Blog section page and its descendents will return `images/typewriter.jpg` when `.Params.banner` is invoked unless:
|
||||||
|
|
||||||
|
- Said descendent has its own `banner` value set
|
||||||
|
- Or a closer ancestor node has its own `cascade.banner` value set.
|
||||||
|
|
||||||
## Order Content Through Front Matter
|
## Order Content Through Front Matter
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user