Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow opt-out of template/directory data files #1543

Closed
Zearin opened this issue Dec 6, 2020 · 3 comments
Closed

Allow opt-out of template/directory data files #1543

Zearin opened this issue Dec 6, 2020 · 3 comments

Comments

@Zearin
Copy link
Contributor

Zearin commented Dec 6, 2020

Is your feature request related to a problem? Please describe.

I'm porting a personal project that makes heavy use of a data directory. In my old setup, I had already arranged my data into a hierarchical set of folders and files. I already had the data hierarchy exactly as I wanted it by simply importing (or require-ing) the top-level index.js file.

Although I think Eleventy’s built-in feature to construct the data hierarchy based on nested folders is a cool feature, I want to turn it off for this particular project. The data is now bloated with lots and lots of duplicates, and the hierarchy I had previously constructed now requires me to insert a lot of .index. everywhere («something».index.«something»), because I used the standard practice of using index files as the default place for importing data in each subdirectory.

Describe the solution you'd like

I want a boolean option in Eleventy’s configuration that allows me to turn off Eleventy’s automatic data-hierarchy feature.

@zachleat
Copy link
Member

zachleat commented Aug 6, 2021

Specifically, you mean this feature right? https://www.11ty.dev/docs/data-template-dir/

@zachleat zachleat changed the title Allow opt-out of automatic folder-to-data translation Allow opt-out of template/directory data files Aug 6, 2021
@zachleat zachleat added the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Aug 6, 2021
@zachleat
Copy link
Member

zachleat commented Aug 6, 2021

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’t forget to upvote the top comment with 👍!

@zachleat zachleat closed this as completed Aug 6, 2021
@zachleat zachleat added this to the Eleventy 2.0.0 milestone Dec 14, 2022
@zachleat zachleat removed the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Dec 14, 2022
@zachleat
Copy link
Member

zachleat commented Dec 14, 2022

This is implemented with #1699, pending docs issue #2681

2.0.0-canary.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants