Eleventy: Feature request: Treat any *.11tydata.js file as a directory data file.

Created on 15 Apr 2019  路  3Comments  路  Source: 11ty/eleventy

There have been a few instances where I wished that directory data files did not have to be named the same thing as the directory itself.

For example, I wanted to put a table of contents file inside of each of my category folders:

/performance
  toc.11tydata.js
  post-one/
  post-two/
/security
  toc.11tydata.js
  post-one/
  post-two/

Also, because we localize our site, our directory structure looks like this:

en/
es/
ja/

So the directory data file that I'm using for my homepage has to be called en.11tydata.js but I'd much rather just call it home.11tydata.js so it doesn't seem like it's related to the language itself.

enhancement needs-votes

Most helpful comment

It'd be great if this could apply to JSON files too. For example, allow for DIRECTORY/index.json instead of insisting upon DIRECTORY/directory.json.

All 3 comments

It'd be great if this could apply to JSON files too. For example, allow for DIRECTORY/index.json instead of insisting upon DIRECTORY/directory.json.

猬嗭笍 Seems more framework agnostic to me.

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

View the enhancement backlog here. Don鈥檛 forget to upvote the top comment with 馃憤!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

proog picture proog  路  3Comments

zachleat picture zachleat  路  3Comments

kaloja picture kaloja  路  3Comments

nilsmielke picture nilsmielke  路  4Comments

smaimon picture smaimon  路  3Comments