You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a few types of pages that I currently exclude from collections because I want them to disappear across the site (including sitemap, tag pages, lists of posts). Drafts are my main use case, but I also have a few test posts for checking markup and deleted pages are generated with a stub but otherwise should disappear.
However, I still want to access the drafts and test pages. I currently have to manually curate a drafts page, and I can't use test pages in some tests because I can't get the page data.
Describe the solution you'd like
I would like a collection of only the excluded pages.
I personally think that this could be solved with #955, as you could move all draft posts in a seperate layer under a drafts collection.
I'd personally recommend against a collection called "excluded" that includes the excluded pages (this sentence is hard, I know), but instead recommend adding a new excludedFromCollections variable next to collections.
So instead of
{% for posts in collections.excluded.test %}
you'd use
{% for posts in excludedFromCollections.test %}
That way you could still create a collection called "excluded" as a user.
Naming to be discussed.
What I did in the past to resolve this, was often changing the collection to "hidden_test" so they are actually moved into a separate collection, but that's also not ideal and breaks with directory data files that apply collections.
That possibly could work but wouldn't be ideal as it would still require remembering to filter this content elsewhere in my site. I still want all this content excluded from everywhere (main posts list, tag pages, sitemap, etc). I only want to opt-in to accessing these pages on my draft view.
I’ve landed on this limitation when trying to HTTP 301 my RSS feed (which is excluded from collections) to a different location. I’ve been gathering aliases properties from pages to collate into one big .htaccess:
But the RSS feed page understandably is not picked up by this routine. It would be great to be able to concatenate excluded pages to the all collection.
Perhaps a good API insertion point would be in the collections API, in the form of getAll(include_excluded: true), or a clearer getExcluded() method as suggested before.
Is your feature request related to a problem? Please describe.
I have a few types of pages that I currently exclude from collections because I want them to disappear across the site (including sitemap, tag pages, lists of posts). Drafts are my main use case, but I also have a few test posts for checking markup and deleted pages are generated with a stub but otherwise should disappear.
However, I still want to access the drafts and test pages. I currently have to manually curate a drafts page, and I can't use test pages in some tests because I can't get the page data.
Describe the solution you'd like
I would like a collection of only the excluded pages.
I'd prefer if using a string as the eleventyExcludeFromCollections would automatically group them but that feels a little out of scope.
Describe alternatives you've considered
I've considered not setting eleventyExcludeFromCollections and doing filtering elsewhere, but this has some problems.
Additional context
I've also looked at #1175 but I don't think that would work as I still don't want content on the tag pages.
The text was updated successfully, but these errors were encountered: