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
Plz. consider using a collection.tags as an object which holds all the automatically resolved collections by a concrete tag...
...so the code in the sample (documentation) would turn to collection.tags.cat, collection.tags.dog
Would be ideal to introduce this in a major version change, so 1.x @zachleat
To Reproduce
See current behavior with 20+ tags...
Expected behavior
Minimal change in the collection object, making it less polluted (avoiding eventual overwrites with manually added collections, etc.)
Screenshots
n/a
Environment:
OS and Version: w10
Eleventy Version: 0.11.1
Additional context
n/a
The text was updated successfully, but these errors were encountered:
@zachleat To me, the current set up pollutes the collections namespace - especially when you have lots of tags. I have lots of other things in frontmatter / under collections, and I don't need my tags all at that level too - I'd much prefer if all my tags were collected under a namespace.
The other way of looking at it is that they're all of a certain type of thing - so it makes sense they be under their own namespace. If I was adding other data that has multiple of a thing I'd likely put it under a namepsace to collect them.
I think I've seen a number of issues discuss this - will try to dig up.
Another possible use would be that it could be easier to work with them - right now if a template wants to iterate over tags, they'd can't just read them - as collections has other stuff too. You'd need a custom collection to collect a second copy of tags to expose them in an iterable way.
Describe the bug
Due to tags the collection object get's easily polluted - especially with lot of tags in use - see: https://www.11ty.dev/docs/collections/#multiple-tags-multiple-lines
Plz. consider using a collection.tags as an object which holds all the automatically resolved collections by a concrete tag...
...so the code in the sample (documentation) would turn to collection.tags.cat, collection.tags.dog
Would be ideal to introduce this in a major version change, so 1.x
@zachleat
To Reproduce
See current behavior with 20+ tags...
Expected behavior
Minimal change in the collection object, making it less polluted (avoiding eventual overwrites with manually added collections, etc.)
Screenshots
n/a
Environment:
Additional context
n/a
The text was updated successfully, but these errors were encountered: