Pagination page not added to custom frontmatter collection
Author: AqueMCreated Jul 25, 2026Updated Jul 25, 2026
Labelsneeds-triage
Operating system
Microsoft Windows 10 Home
Eleventy
3.1.6
Describe the bug
- I created a filter to return all pages with the custom front matter
mainMenu: true:
eleventyConfig.addCollection("menuPages", function (collectionApi) {
return collectionApi.getAll().filter((item) => item.data.mainMenu);
});- I created a page that iterates through a tag collection
---
mainMenu: true
linkName: Thoughts
pagination:
data: collections.thoughts
size: 10
alias: pageItems
reverse: true
---where collections.thoughts references pages with tags: thoughts in front matter - an equivalent to blog posts.
- Despite having
mainMenu: trueafter build, the first page of Thoughts collection does not appear in themenuPagescollection. Other pages using pagination do appear in themenuPagescollection, but they all iterate over collections originating from global data json files.
Expected behaviour: when a page meets the criteria to be included in a collection, it is added to said collection, regardless of the data source it uses.
Reproduction Source Code URL
https://github.com/AqueM/webpage
Screenshots
No response
Source: 11ty/buildawesome