Category pages

jekyll-category-pages is a Jekyll plugin that automatically creates pages for each category in your site. Instead of manually setting up category pages, this plugin generates them dynamically based on your site’s posts.

Usage

  1. Add the following to your Gemfile
group :jekyll_plugins do
  gem "jekyll-paginate"
  gem "jekyll-category-pages"
end

and install it

bundle install
  1. Add the following settings to your _config.yml file
# jekyll-category-pages settings
category_path: category
category_layout: category_layout.html
  1. (optional) Add a tag index page category/index.html with the following content
---
title: Category
layout: category_index
---
  1. Add a category to your post

To assign a category to a post, include it in the front matter

---
title: My Sample Post
category: sample
---

Or place the post within a directory. The directory names will be automatically registered as categories for the post.

Demo

Live demo

Additional resources

In this article