The docs are a little ambiguous w.r.t. how cascade is supposed to work. Here are two occurrences in the docs which describe the cascade attribute:
-
This example suggests that the cascade is applied to the _index.md page, as well as it’s descendants
-
The description in the predefined front matter variables section states that “values are passed down to the page’s descendants”
The latter could be interpreted as the cascaded property is only passed down to descendants. This seems to be the result I am getting too. Unless I explicitly specify the front matter key on the section page which declares the cascade, the section page does not get the assignment.
Small repro: GitHub - dvdksn/hugo-cascade
/content/foo/_index.md
cascades a build option to disable rendering of the pages. But building the site still creates a public/foo/index.html
file.
I guess my question is if this is by design, or if it’s a bug and the section page should also receive the cascaded property?