Is cascade supposed to apply on the section page?

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 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/ 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?

A couple of things before digging into this…

1) To properly test file generation your repo should include a single page template
2) You have “render: never_” in your front matter instead of “render: never”

thanks @jmooring, looks like I made my test case a little too minimal :smile: it seems that cascade does hit the section page. I once hit another case where it seemed not to, but I’m not able to reproduce, so I’ll close this!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.