Replies: 2 comments
-
I don't think this is currently possible like that. Not sure if that would include everything in tagged with "technology"-OR-"food" versus "technology"-AND-"food". Since it sounds like you want the "AND" option, I'd probably add a custom collection in your Eleventy config file like this using eleventyConfig.addCollection("foodAndTechnology", collectionApi => {
return collectionApi.getFilteredByTags("food", "technology");
}); ---
# eleventyNavigation:
# key: Home
# order: 1
pagination:
data: collections.foodAndTechnology
size: 3
alias: posts
reverse: true
generatePageOnEmptyData: true
---
{% for post in posts %}
<article>
<h1>{{ post.data.title }}</h1>
<p>tags={{ post.data.tags | dump | safe }}</p>
</article>
{% endfor %} |
Beta Was this translation helpful? Give feedback.
-
@pdehaan Thanks your your help and the quick answer. |
Beta Was this translation helpful? Give feedback.
-
So far I think I understand pagination.
Is it possible to add more than one collection to a pagination?
Let's say I want to include all 'posts' with tag 'technology' and 'food' at the same time:
Beta Was this translation helpful? Give feedback.
All reactions