infiniteluke / next-static

A simple static blog powered by next.js
MIT License
105 stars 9 forks source link

Pagination #3

Open infiniteluke opened 7 years ago

infiniteluke commented 7 years ago

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.

jacobpdq commented 7 years ago

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.

infiniteluke commented 7 years ago

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.