jekyll-paginate is a Jekyll plugin that adds pagination functionality to your site, allowing posts to be split across multiple pages instead of displaying everything on a single page.
Add the following to your Gemfile:
group :jekyll_plugins do
gem "jekyll-paginate"
end
Then, install the plugin:
bundle install
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
(Optional) Add an index page at blog/index.html
---
title: My Blog
layout: paginate
---
Use layout: paginate_timeline if you want the timeline-style listing instead of the card grid layout.