I’ve followed Jekyll’s documentation on how to implement pagination, but it’s not enough for me. Eventually got it figured out after few hours of try and error, so here it is a straightforward guide on how to paginate your blog’s homepage using Jekyll’s Paginate library.

Firstly, you need to bootstrap your own Jekyll blog using this guide.

Spec from Github Pages dependency version is as follows:

  • jekyll 3.9.3
  • jekyll-paginate 1.1.0
  • minima 2.5.1

This tutorial assumes user to use default configuration of Minima theme. In other words, theme’s layout have not been changed.

  1. Modify _config.yml. Add the following:
paginate: 6
paginate_path: "/page/:num/"

paginate: number of items per page.
paginate_path: can be anything. This will be displayed as the slug in blog’s URL.

  1. Rename index.md to index.html.
  2. Add the following code into index.html

If you wish to add a banner or a hero image in the front page, simply edit index.html and put it above <div class='home'> tag. Or modify it as you wish.

See the demo.


<
Previous Post
Migrasi Nota
>
Blog Archive
Archive of all previous blog posts