Monthly indexes for Jekyll
• Mark Eschbach
Jekyll has been a great blog publishing format so far. I am not entirely sold if I will be using Jekyll for the Knowledge Base stuff I have written so far, however I am definitely considering it. An improvement I would like to make is to provide monthly indexes of topics residing within there. Currently these generate 403 because there are no indexes.
First hit was Generating monthly archives with Jekyll by José F. Romaniello. This looks promising, however I am wondering if there isn’t a pre-packaged plugin which solves this problem. Nice to see how one would be coded though.
Next up was a Github issue for an official Jekyll project. This
looks really promising. First question I have is this already installed? From the project’s main page,
the Gem appears to already be installed! Just ot make sure, let’s check the
Gemfile.lock. Hmm, the Gem does not
appear to be installed. Perhaps Jekyll automatically adds them?
No! Alright, easy enough to add this to the
Gemfile and install via
group :jekyll_plugins do gem 'jekyll-archives', '2.1.1' end
Next up is to ensure the plugin directive exists as per the instructions on the website.
plugins: - jekyll-archives
jekyll-archives a shot
Well, the just running the command ot produce the site did not work. Turns out you need an additional stanza in your
_config.yml file which goes something like the following.
jekyll-archives: enabled: 'all' layout: 'archive'
Well, that seemed to do the job. Now to figure out how to customize the archive! A problem I will have ot leave for next time.