Directory Data File in Top Level Input Directory #4087
Replies: 7 comments
|
This still doesn't seem to be documented as at 13 July, 2023 (11ty/docs@dcf4410). But for anyone else who comes across this: if you have files under |
|
But how does one specify data for a subdirectory, say |
|
I have no idea - as I said, it's undocumented. Or was your question directed at the eleventy maintainers? |
|
Workarounds until this one ships are to use global data or the Configuration API method to set global data: |
|
One more addition here, if your input directory is nested inside of your project directory (e.g. This feature is specifically when your input directory is |
|
Punting this one out of 3.0, sorry!
|
Uh oh!
There was an error while loading. Please reload this page.
It is not clear in the documentation how to name
directory data filein top level of input directory. Page: https://www.11ty.dev/docs/data-template-dir/--unput=.file should be.11tydata.jsonorproject-name.11tydata.json?--unput=./src/file should be.11tydata.jsonorsrc.11tydata.json?Related issues:
All reactions