Jekyll!? Jekyll and Hyde?
So first of all let’s clarify what jekyll exactly is. Jekyll is a platform that you can use for blogging. It converts dynamic content into static web pages.
If you would like to host a web page on github you’d soon notice that you can’t have dynamic content. That’s exactly where jekyll comes in. It converts dynamic content of your blog into a series of static pages.
To learn more about jekyll and how to configure it you can read at jekyllrb.com.
Jekyll and tags
Actually there are plugins that give you functionality of tags but github allows only limited amount of plugins.
As of writing this blog post these jekyll plugins are supported:
- Jemoji - provides support for emoji within Jekyll posts and pages
- Jekyll-mentions - provides support for @mentions within Jekyll posts and pages
- Jekyll-redirect-from - redirects visitors to an updated URL when Jekyll post or page filenames change.
- Jekyll-sitemap - adds a standards compliant sitemap for your GitHub Pages.
As you can see there is currently no tag plugin supported.
So what do we do? Well we build it ourselves. I’ve been searching for a solution and soon stumbled upon the following website tags-and-categories-on-github-pages
The solution proposed on that website is good but some steps were omitted. For it to work you have to enable relative permalinks in your config.
I’ve also simplified the logic for generating tags with their respective links:
The important part is
Which is considerably shorter then approach given on tags-and-categories-on-github-pages
There are more complex solutions where you can have categories but for my needs implementing tags as easily as possible was enough.
This post is on GitHub. If you spot any errors please do a pull request.
comments powered by Disqus