Hi everyone, there’s a way to paginate the files inside the _data folder?
Because I used an API cms (Strapi) and I created a plugin that generate for each API’s call a JSON file. Basically I used these json files inside for cycle in the code.
So I want to paginate the records inside this files
not that I know of. The way you get info out of a data file is to call it while on a page - but that page cannot be paginated. And there is no concept of creating pages from data.
You could make a plugin to do it I think - I think I have seen an example where someone had products in a data file and wanted a page for each product.
In what sense do you want to paginate? In the JSON files, in Jekyll rendering the JSON, in getting the JSON on the frontend with JS?
So I want to paginate the records inside this files
Can you provide a sample of what this looks like? Such as if you have 1000 rows in your JSON file and you want 5 files of 200 rows each? That can be achieved from the shell with Python, Node, Ruby, etc. Or Ruby if you want a plugin to do it for you.
If you have say 3 API calls, you’ll get 3 JSON files in _data, by the sound of how your plugin works.
Are those identical calls for multiple pages, or 3 different endpoints?