Directory/Template Data Folders #4077
zachleat
started this conversation in
Enhancement Queue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Surfaced by #647
Given the example on https://www.11ty.dev/docs/data-template-dir/:
posts/subdir/my-first-blog-post.mdThis would create additional data cascade folder checks for (using the standard data file suffix for folders in addition to files):
posts/subdir/my-first-blog-post.11tydata/*.jsposts/subdir/my-first-blog-post.11tydata/*.jsonposts/subdir/subdir.11tydata/*.jsposts/subdir/subdir.11tydata/*.jsonposts/posts.11tydata/*.jsposts/posts.11tydata/*.json(including any custom data formats, as usual)
Files found in these folders would re-use the convention of a global data folder, where the file name would inform the variable name in the data cascade.
Beta Was this translation helpful? Give feedback.
All reactions