The jekyll-archives plugin let’s you generate pages which list posts by their categories, tags or date. This site uses jekyll-archives to organise tutorials by their category.


  1. Create a Gemfile if you don’t already have one.
  2. Add jekyll-archives to the jekyll_plugins group in your Gemfile:
    source 'https://rubygems.org'
    gem 'jekyll', '3.3.1'
    group :jekyll_plugins do
      gem 'jekyll-archives'
  3. Run bundle install


All configuration is set in _config.yml under the archives key. The default configuration is set to this:

  enabled: []
  layout: 'archive'
    year: '/:year/'
    month: '/:year/:month/'
    day: '/:year/:month/:day/'
    tag: '/tag/:name/'
    category: '/category/:name/'


Describes which archives types are enabled. The options are ‘all’ or an array of any combination of year, month, day, categories, tags.

enabled: all
  - categories
  - year
  - month
  - tags


The layout to use if no type specific layout is set.

layout: archive

Type specific layout

Layouts for specific types of archives.

  year: year-archive
  month: month-archive
  day: day-archive
  tag: tag-archive-layout

Customise the permalink format of the archive pages.

  year: '/archives/year/:year/'
  month: '/archives/month/:year-:month/'
  tag: '/archives/tag/:name/`

Check out the configuration documentation for in-depth information.


Once the plugin is set up you can link to the permalink you’ve set up. On this site, there’s a category called jekyll-plugins so I can link to it like this:

<a href="/categories/jekyll-plugins/">Plugins</a>

You can output all the categories and links to their archive pages by looping of site.categories:

{% for category in site.categories %}
  {% assign category_name = category[0] %}
    <a href="/category/{{ category_name | slugify }}/">{{ category_name | replace: "-", " " }}</a>
{% endfor %}

I always replace spaces with hyphens in my category names to avoid having %20 in the URLs making them a little nicer to read. If you do this you can just replace - with a space when you output the actual name like I have above.