Paginate content in pages generated from global data #3185
Unanswered
carloscabo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a big global data JSON of images (
ìmages.json
) to build an image gallery with a structure like this (It's exported from a DB table):And also a related
category.json
Following this article, https://florian.ec/blog/eleventy-data-pages/ I was able to generate a single gallery page for each category (great).
My
gallery.njk
(the template I use to generate those pages) looks this way.The
filterById
returns a collection of the images of the corresponding category.Until this point everything went Ok... I get a bunch of pages each one containing the corresponding images of the category.
The question is that some of these pages have a lot of images, so I'm looking for a way to paginate them again in a second level (each one of them containing 20 images or so) and get something like:
I'm looking for a solution that will not imply
split
,cut
ordivide
theimages.json
if possible 👼Beta Was this translation helpful? Give feedback.
All reactions