Automatically generate post archives by dates, tags, and categories.
- Add
gem 'jekyll-archives'
to your site's Gemfile - Add the following to your site's
_config.yml
:
gems:
- jekyll-archives
jekyll-archives
is configurable from your site's _config.yml
file:
jekyll-archives:
layout: archive # The default layout to use for archive pages.
enabled: # Specifies which archives are enabled.
- year
- month
- tags
layouts: # (Optional) Specifies type-specific layouts.
year: year-archive
month: month-archive
permalinks: # (Optional) The permalinks to use for each archive.
year: '/:year/'
month: '/:year/:month/'
day: '/:year/:month/:day'
tag: '/tag/:name/'
category: '/category/:name/'
Archives are enabled based on the following configuration rules:
- All archives are disabled by default.
- All archives can be enabled by setting
enabled: true
orenabled: all
. - Individual archives can be enabled by setting
enabled
to an array (see above example).