-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow eleventyExcludeFromCollections to take an array of collections #1175
Comments
I like this idea! It must go into the queue!
|
Apologies if commenting here (and now) is inappropriate. Anyway: this gets a strong 👍 from me: Paul's use-case is something I also run into all the time… |
@davidhund Basically, Zach's looking at https://github.com/11ty/eleventy#major-roadmapped-features for making decisions. |
Please add the ability to exclude from collections on a per-collection basis (or include in |
…a list of tags This is a first implementation for 11ty#1175 and 11ty#2287 to gather feedback. This change allows for more fine grained control over how a template is excluded from collections by allowing to set eleventyExcludeFromCollections to a tag or list of tags to exclude the template from. This is meant as a first implementation for feedback. Also I'm not completely sure if excluding the `all` Collection is done correctly. I only added minimal tests, but probably some more are needed. Signed-off-by: Raphael Höser <raphael@hoeser.info>
Please reopen this issue 😥, |
@nitin2953 Just because an issue is closed, doesn’t mean it’s not on the roadmap. Things work in a rather strange way on this project. |
#2482 was merged—this will ship with 3.0. |
Is your feature request related to a problem? Please describe.
I have an index file alongside a group of posts
posts.11tydata.js
adds apost
tag to all posts in this folder, andindex.njk
loops throughcollection.post
, but this loop includesindex.njk
as well as all the individual posts.I can exclude the index by using
eleventyExcludeFromCollections: true
, but that excludes it from all collections. But in mysitemap.xml
I want to include it when I usecollection.all
.Describe the solution you'd like
Allow
eleventyExcludeFromCollections
to take an array of collections to be excluded from:Describe alternatives you've considered
Currently I add
tags: false
to the index file, but it’s not as explicit.The text was updated successfully, but these errors were encountered: