What are the different ways a type can be applied to all markdown posts in a nested section? I have read about the cascade, but I want to know if there are other methods to do so, to distinguish content types.
In order of precedence, a content’s .Type
is defined by:
- The
type
value set in front matter - Cascading the
type
front matter value from an ancestor (including site configuration at the top of the tree) - The top level directory
Could you kindly elaborate on point number 2? I guess the ancestor is the _index.md
file? How is type set in site configuration?
Yes, all the way up the tree to content/_index.md
, and anywhere in between. Precedence increases as you move down the tree.
The highest level, and with the least precedence, is the site config.
I think the ancestor method is the easiest and it is the one I will use going forward.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.