question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paginating 11k articles

See original GitHub issue

Hello 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
nimaa77commented, Jan 8, 2020

hello @nicgutierrez
I think you mentioned wrong person

you should call @nimahkh .

have nice day Peace ✌️

0reactions
github-actions[bot]commented, Feb 12, 2020

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! 💪💜

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Scrape Multiple Pages on a Website - Web Scraper ...
Looking to scrape a lot of data from multiple pages? Here's how to use a free web scraper and easily deal with website...
Read more >
High-Performance Pagination REST API Query Builder
In this article, you will learn how to implement pagination over REST API, to manage voluminous data with considerable ease, ...
Read more >
Newest 'pagination' Questions - UX Stack Exchange
I am not sure how to paginate the article because there are no explicit rules that explain how many ... readability · pagination...
Read more >
How to Implement Pagination with Laravel Collections?
Paginate the query after your where clause: $articles = Article::with('category')->where('status', 'submitted')->paginate(10);.
Read more >
Index of /web/app/themes/kernl-wp/vendor/nupods/kernl-lib-wp/src
[TXT], Articles.php, 2019-06-13 12:12, 15K. [TXT], Auth.php, 2019-06-13 12:12, 1.3K. [TXT], Config.php, 2019-06-13 12:12, 11K. [TXT] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found