Skip to content
Browse files

Add Cascade documentation

Fixes #905
  • Loading branch information...
regisphilibert committed Sep 9, 2019
1 parent 38a15e6 commit bae240355113f742bb3d022b5bb363ab5a8f2758
Showing with 19 additions and 0 deletions.
  1. +19 −0 content/en/content-management/
@@ -64,6 +64,9 @@ aliases
: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`.

: 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.

: 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
{{</ 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
# content/blog/
title: Blog
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

0 comments on commit bae2403

Please sign in to comment.
You can’t perform that action at this time.