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 us to prefix Directory Data Files with an underscore #774

Closed
mattwaler opened this issue Nov 16, 2019 · 5 comments
Closed

Allow us to prefix Directory Data Files with an underscore #774

mattwaler opened this issue Nov 16, 2019 · 5 comments
Labels
enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.

Comments

@mattwaler
Copy link

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

In large folders full of lots of MD files, having to mimic the directory name exactly causes the config file to get lost among the MD files. See screenshot:

Screen Shot 2019-11-16 at 3 19 31 PM

Describe the solution you'd like

Allowing us to prefix the Directory Data File with an underscore, it would sort to the top of the folder, allowing for easy identification and separation from the content files. Something like this:

Screen Shot 2019-11-16 at 3 20 53 PM

Describe alternatives you've considered

No other solutions come to mind.

Additional context

I love 11ty!

@mattwaler
Copy link
Author

@zachleat Any possibility for this being implemented? I might be able to take a crack myself!

@ithinkihaveacat
Copy link
Contributor

ithinkihaveacat commented Mar 29, 2020

Requiring the *.11tydata.js to match the directory name also means that renaming the directory also requires renaming the file as well, which easy to miss and annoyingly to do. Using and underscore and also using the same name (e.g. _index.11tydata.js might be better.

@mattwaler
Copy link
Author

That's not a bad idea @ithinkihaveacat, I didn't think about that.

Maybe a happy medium would be combining the _ and the jsDataFileSuffix config value to create this, so the file would be /dir/_11tydata.js, and could be customized.

Not sure if that's possible though!

@zachleat
Copy link
Member

zachleat commented Jul 27, 2021

I believe #1699 is related to this.

I don’t think we want to add additional magic here but #1699 might be a nice configurable way out!

@zachleat zachleat added the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Jul 27, 2021
@zachleat
Copy link
Member

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 👍!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
Projects
None yet
Development

No branches or pull requests

3 participants