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.
Gemfile
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-category-pages"
end
and install it
bundle install
_config.yml
file# jekyll-category-pages settings
category_path: category
category_layout: category_layout.html
category/index.html
with the following content---
title: Category
layout: category_index
---
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.