Adding tags to pages created from paginating a data set #2748
-
|
Hi Everyone, When creating a bunch of pages by using the pagination feature and iterating over a data set, is it possible to add tags to them somehow? What I am trying to do is query a headless CMS for all my blog posts and then utilize pagination to generate individual blog pages. Unfortunately, I am not able to add Any help would be greatly appreciated. Thank you! 🙏🏼 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Good news, bad news... You should be able to dynamically set But if you know the dynamically set tags, you might be able manually create the collections in your .eleventy.js config file using a TIP: You might also be able to use pagination's |
Beta Was this translation helpful? Give feedback.
Good news, bad news... You should be able to dynamically set
tagsviaeleventyComputed, but collections will not automatically be created. See #1225 (and related issues) for some more info.But if you know the dynamically set tags, you might be able manually create the collections in your .eleventy.js config file using a
forloop.TIP: You might also be able to use pagination's
aliasinstead of usingpagination.items[0]: https://www.11ty.dev/docs/pagination/#aliasing-to-a-different-variable