I have forked an amazing jekyll template on GitHub (See Live Demo ) that is hosted using GitHub Pages, and I am using posts within collections to have a better user experience.
My issue is to provide pagination (5 posts per page) for each collection.
Something similar to this :
Another example :
I want to be able to have only 2 posts on the following page and then the 3rd post on the page 2.
I’m pretty sure the default Jekyll Pagination plugin (which is the only one of its kind currently supported by GitHub Pages) doesn’t work with paginating anything other than posts.
It also has the limitation of being used once. To do what you want you’ll need to use a different plugin. Jekyll Paginate V2 supports paginating posts, categories, tags, and collections. Only issue for you will be that it isn’t supported by GitHub Pages.
So to use it you’d have to modify how you use Jekyll with GitHub Pages and utilize some sort of deployment process.
A popular one is to build the site locally and then push the contents of your
_site folder to GH Pages. There are several ways of automating this. Another approach is to use a service like Travis CI, Netifly, and many others to manage the building and deploying of your site to GH Pages.
If talk.jekyllrb.com wasn’t wiped recently I could have pointed you to a few threads that had solutions, but instead you’ll have to resort to Googling around.
You could also poke around in my repo about locally generated page. It’s not fully automated via CI thou, but it works. The
Makefile works only on *nix systems thou and just calling
make after the commit will execute Jekyll, commit the new files to
master branch and pushes changes to github. Source data are in