Multi-level pagination in 11ty?

All the documentation I’ve found on Eleventy pagination has to do with a single level, and I’ve got that working pretty well.

  • Take a collection (ex. of tags) and create one page each
  • Take a collection of posts and put 10 on each page and so on.

What I’d like to do now is combine them: loop over all the tags, and then paginate each tag’s collection so if I use some tags a lot, they don’t end up with 50 posts on the same page. Basically the way WordPress generates paginated views for each tag.

Something like this: (simplified, I know filters need to be in there)

pagination:
data: collections
size: 1
alias: tag
pagination:
data: tag
size: 10
alias: tagpost

Though that didn’t seem to work.

Is there some way to do multi-level pagination, or would I need to take some other approach for the outer loop?

On StackOverflow