eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

Add support for index.* Directory Data Files

Open milahu opened this issue 3 years ago • 0 comments

support global / constant basename like index for Directory Data File so when renaming directories, we dont have to rename the directory data files too

.eleventy.js

module.exports = function(eleventyConfig) {
  return {
    jsDataFileBase: 'index',
  };
};

some/path/index.11tydata.json

{
  "tags": "someTag"
} 

some/path/someFile.md

# hello

now some/path/someFile.md (and other files in some/path/) is tagged with someTag

todo: add docs and tests

milahu avatar Mar 18 '21 11:03 milahu