Paginating 11k articles
See original GitHub issueHello everyone!
I’m working on a POC for our Blog and I have a question about how to approach pagination and although I found lots of info about it, I’m still unsure about the best way to handle this.
So, as the title says, I have a blog with over 11k articles. I’m aware on how to create pages like /posts/1
, /posts/2
etc, and I’m also aware of the benefits of doing so. However, that’s not what I’m after. Our current blog has infinite pagination on every single page where articles are posted: Category page, Tag page, Author page, Home etc.
So, loading all the articles in one go and slicing the array works, however this is quite slow and pages take a bit to load.
Does anyone have any suggestions on how to approach this? I saw somewhere about creating json
files in gatsby-node
and using those with XHR to load additional posts during window scroll. Is this good? Is there a better approach out there? I will need to do this for every page, so I will end up with several json files.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
hello @nicgutierrez
I think you mentioned wrong person
you should call @nimahkh .
have nice day Peace ✌️
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m
HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!Thanks again for being part of the Gatsby community! 💪💜