Pagination

Pagination

jekyll-paginate is a Jekyll plugin that adds pagination functionality to your site, allowing posts to be split across multiple pages instead of displaying all posts on a single page.

Usage

  1. Add the following to your Gemfile:

    group :jekyll_plugins do
      gem "jekyll-paginate"
    end
    

    Then, install the plugin:

    bundle install
    
  2. Add the following settings to your _config.yml file:

    # jekyll-paginate settings
    paginate: 5  # Number of posts per page
    paginate_path: "/blog/page:num"  # URL structure for paginated pages
    
  3. (optional) Add a index page blog/index.html

     ---
     title: My Blog
     layout: paginate
     ---
    

Demo

Live demo

Additional resources