I'd like to be able to automatically generate by-year archive pages for every year in my blog history. That is, if I have at least one post from 2014, I'd like to be able to generate /archive/2014/index.html
, and if I have at least one post from 2013, I'd like it to generate the page /archive/2013/index.html
. Is there a way to do that in Jekyll?

- 10,571
- 13
- 67
- 103
2 Answers
Jekyll doesn't provide that feature by default. However, one of the most common plugins is jekyll-archives that is capable to generate post archives by dates, tags, and categories.
However, just keep in mind that this plugin is not supported if you are using GitHub pages as explained here. Actually, in the post itself you can see it is really hard that GitHub will ever support year or categories archives in general.

- 173,507
- 49
- 363
- 364
In case you can't use plugins (for example if you need your site to work on GitHub Pages), you can create one page that contains all years.
This is possible without plugins, for an example see Jekyll/Liquid Templating: How to group blog posts by year?.
If you absolutely must have a separate page for each year and still can't use plugins, there's another way if you're okay with generating a page with two lines of YAML front-matter for each year.
Here's an example where I'm showing how to create tag/category pages (separate page per tag) without using plugins.
It's not that difficult to create something similar for the years of post dates.

- 1
- 1

- 35,843
- 15
- 128
- 182