Pages render based on variable data. Sometimes this data is defined within the page's own Front Matter. However, there are instances where it's more effective to share this data with a number of pages.
For example, imagine a "Guides" page where on the left side of the page, there's a menu with a bunch of different guides that you can read. This feels like a single page, but in reality, it's many pages that all look very similar, and display the same menu.
In the absence of data inheritance, every one of those guide pages would need to re-state the entire menu of options.
A better approach is to support the creation of a _data.yaml file in the directory that holds all the guide pages, and automatically apply that data to each of the guide pages.
Pages render based on variable data. Sometimes this data is defined within the page's own Front Matter. However, there are instances where it's more effective to share this data with a number of pages.
For example, imagine a "Guides" page where on the left side of the page, there's a menu with a bunch of different guides that you can read. This feels like a single page, but in reality, it's many pages that all look very similar, and display the same menu.
In the absence of data inheritance, every one of those guide pages would need to re-state the entire menu of options.
A better approach is to support the creation of a
_data.yaml
file in the directory that holds all the guide pages, and automatically apply that data to each of the guide pages.