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

Feature removal: ambiguous layout file search #1924

Closed
zachleat opened this issue Aug 10, 2021 · 5 comments
Closed

Feature removal: ambiguous layout file search #1924

zachleat opened this issue Aug 10, 2021 · 5 comments
Labels
breaking-change This will have to be included with a major version as it breaks backwards compatibility. enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.

Comments

@zachleat
Copy link
Member

zachleat commented Aug 10, 2021

If you omit the file extension (for example layout: mylayout), Eleventy will cycle through all of the supported template formats (mylayout.*) to look for a matching layout file.

https://www.11ty.dev/docs/layouts/#omitting-the-layouts-file-extension

I’d like to phase out the above feature and make it not enabled by default, with the option to re-enable via config option.

This feature requires potentially 10 or 11 file system checks (one per template extension) and the ordering is ambiguous. If you have a base.liquid and base.njk—which does it select? I think for this specific case it’s better to be explicit, especially as we improve incremental builds.

@zachleat zachleat added the breaking-change This will have to be included with a major version as it breaks backwards compatibility. label Aug 10, 2021
@zachleat zachleat added this to the Eleventy 2.0.0 milestone Dec 13, 2022
zachleat added a commit to 11ty/11ty-website that referenced this issue Dec 13, 2022
@zachleat
Copy link
Member Author

zachleat commented Dec 13, 2022

Docs for this at https://www.11ty.dev/docs/layouts/#omitting-the-layouts-file-extension

@j-f1
Copy link
Contributor

j-f1 commented Dec 14, 2022

this functionality will likely may be removed

Looks like you have one or two extra words there :)

zachleat added a commit to 11ty/11ty-website that referenced this issue Dec 14, 2022
@zachleat
Copy link
Member Author

Pushed a fix, thank you @j-f1!

@zachleat
Copy link
Member Author

Notably, this is being reverted!

#2708

@zachleat zachleat removed the breaking-change This will have to be included with a major version as it breaks backwards compatibility. label Dec 21, 2022
@zachleat zachleat removed this from the Eleventy 2.0.0 milestone Dec 21, 2022
zachleat added a commit to 11ty/11ty-website that referenced this issue Dec 21, 2022
@zachleat zachleat added enhancement needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. breaking-change This will have to be included with a major version as it breaks backwards compatibility. labels Dec 21, 2022
@zachleat
Copy link
Member Author

Putting this one back into the enhancement queue

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
breaking-change This will have to be included with a major version as it breaks backwards compatibility. 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

2 participants