11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.
https://demo-base-blog.11ty.dev/
MIT License
1.23k stars 619 forks source link

How to add pagination to homepage and tag pages? #129

Closed cawa-93 closed 2 years ago

cawa-93 commented 2 years ago

I would like add pagination to all postlists. For homepage i almost find solution. But how do it for tag pages?

zachleat commented 2 years ago

For archive.njk you just follow the standard pagination instructions (with pagination -> data: collections.posts). See https://www.11ty.dev/docs/pagination/#paging-a-collection

For tag pages you’ll have to get a bit more clever, read the two-layer pagination pinned issue on Eleventy core https://github.com/11ty/eleventy/issues/461