Use the frontmatter term "collections" not "tags" to define which collections a content file should be a part of #4100
ironfish1000
started this conversation in
Enhancement Queue
Replies: 1 comment
-
|
Strictly speaking, tags are labels, not taxonomies. A taxonomy implies a hierarchy, which tags don't have. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
My feature request is related to a problem which I have posted about and described a solution for at:
Previous and Next links and collections #3861
Describe the solution you'd like
Instead of using eg:
use:
IMO this has the following benefits:
Although the docs at https://www.11ty.dev/docs/filters/collection-items/ say:
when using eg Eleventy Base Blog v9 starter, tags are used also to generate taxonomies. IMO this is confusing.
Using "collections" would resolve this.
IMO, it is widely accepted in SSG's and CMS's to use "tags" as a way to apply taxonomy to content. I believe that using tags for taxonomy only would be helpful, especially to newcomers to 11ty who are used to "tags" as a way to apply taxonomy to content.
Using "collections" would resolve this.
In Eleventy Base Blog v9 starter, content files under the "blog" folder are all assigned the tag "posts" to make them part of collections.posts but this term also becomes a taxomony, and has to be then filtered out from being displayed using
eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
return (tags || []).filter(tag => ["all", "posts"].indexOf(tag) === -1);
});
Using "collections" would resolve this.
Describe alternatives you've considered
Please see my post about and described a solution for at:
Previous and Next links and collections #3861
IMO this solution is complex and took hours of trial and error to figure out. Using "collections" would resolve this.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions