Creating Tags with Jekyll

29 May 2012

This blog is powered by Jekyll with Github Pages. So far such combination of tools makes development and deployment of (static) personal website farely easy and fast, plus the flexibility to adapting complex design. If you are looking for a highly personalizable blogging engine and a host for creating static website, Jekyll plus Github Pages will not let you down.

However, it is not without limits. One thing I wanted to do is creating tags for each blog post and have them all collected on a sort of tag archive page. I did a bit of research, and found a direct solution: use a Jekyll plugin. Sadly, Github Pages disables any plugins you are using when creating blog, so that won’t work directly.

Therefore, here is yet another level of indirection (work-around).

The work-around is to generate your static site/blog with Jekyll and its tag-generation plugin, LOCALLY. Then, push the generated content to Github. Here shows you how to generate tags using the plugin, and here shows you exactly how to get around disabling of plugins by Github Pages.

One pitfall I had while following the instructions in the referenced articles above, was forgetting to set safe to false in _config.yml, which is
to enable plugins. Once you have that figured out, everything else should be quite straight-forward.

My _config.yml is listed below for reference:

safe: false
pygments: true
permalink: '/:title'