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.
Colletions are generated and pages are added to collections for tags added in the frontmatter tags field, but not for tags added with eleventyIncluded.
Here's a close-to-minimal 3.0.0 repro. Compare src/index.11ty.js to dist/index.html.
Take eleventyComputed.tags into account when collecting pages.
Describe alternatives you've considered
There might be some way to hack this with a plugin. Gather up the tags, export them, then loop over them in the Eleventy config and manually create new collections. Feels like it would be tricky to go back and add the appropriate pages to the collection. Maaaybe eleventy-plugin-pack11ty's auto-collection would is relevant https://github.com/search?q=repo%3Anhoizey%2Feleventy-plugin-pack11ty%20autocollections&type=code.
Would much prefer to support doing this from within one Eleventy data file.
It is important to note that Computed Data is computed right before templates are rendered. Therefore Computed Data cannot be used to modify the special data properties used to configure templates (e.g. layout, pagination, tags etc.). These restrictions may be relaxed over time.
Is your feature request related to a problem? Please describe.
Colletions are generated and pages are added to collections for tags added in the frontmatter
tags
field, but not for tags added witheleventyIncluded
.Here's a close-to-minimal 3.0.0 repro. Compare
src/index.11ty.js
todist/index.html
.https://stackblitz.com/edit/eleventy-dynamic-collections?file=src%2Findex.11ty.js
Describe the solution you'd like
Take
eleventyComputed.tags
into account when collecting pages.Describe alternatives you've considered
There might be some way to hack this with a plugin. Gather up the tags, export them, then loop over them in the Eleventy config and manually create new collections. Feels like it would be tricky to go back and add the appropriate pages to the collection. Maaaybe eleventy-plugin-pack11ty's auto-collection would is relevant https://github.com/search?q=repo%3Anhoizey%2Feleventy-plugin-pack11ty%20autocollections&type=code.
Would much prefer to support doing this from within one Eleventy data file.
Additional context
This is similar to the title of
but the request there is for dynamic tags added in the frontmatter
tags
field.Possible one enhancement would cover both, but they feel different. Close this issue if I'm wrong to think they're separate!
//
This would get us closer to
Could parse the inputPath and add dynamic tags.
The text was updated successfully, but these errors were encountered: