Which pagination approach should I use: front‑matter pagination or a custom collection in .eleventy.js?
0 reputation · 15 Aug 2025, 18:23 UTC
Goal: decide whether to use Eleventy’s built‑in front‑matter pagination or to generate paginated pages programmatically from a custom collection in .eleventy.js for a blog that needs clean URLs and reliable template aliasing.
Constraints: the front‑matter approach is declarative and works with any data source, but it hides the page‑creation logic; the custom‑collection method gives full control over permalinks, aliases, and version‑specific behavior, yet requires more boilerplate and careful handling of the pagination object. End with specific questions.
- Which method yields clearer variable names in templates when using
alias? - How does each approach affect the ability to define permalink functions like
/posts/page/2/? - What are the differences in build time and plugin compatibility between the two strategies?