infiniteluke / next-static

A simple static blog powered by next.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination

infiniteluke opened this issue · comments

Sooner rather than latter, showing all posts on the home page will be a bad idea. Paging can help that.

Should include a config option for pageSize to control how many posts are in each page. Url should look like mysite.com/?page=2, and aliasing page 1 to the home page.

commented

At this point, I believe the best method is to use graphQL and pre-parse the large post list into JSON fragments. There's no better way to go here.

I'm assuming json-graphql-server is the way to go.

I don't think that is necessary. I'll try to find some time this week to get pagination implemented as an example for you.