A colleague of mine started to work on a planet feed of blogs from people we both work with. The planet feed takes an rss or atom feed from each blog and sorts the posts from all of these together. My issue with that for my blog is that not all the posts I make are applicable to the work that I do. So I wanted to generate a feed that is more work related. I already use the jekyll-feed plugin to generate the feed for my blog so it shouldn’t be too hard right?

So the first thing I needed to do was work out how to generate a feed based upon a tag. Unfortunately the jekyll-feed plugin doesn’t appear to support feeds by tag. And when it was asked for the people maintaining that plugin didn’t have the time to develop that feature. Now this is not a dig at them, they have developed, and maintain, code that I get to use for free. But it does irritate me that the platform I use does not have a feature that is common to most of the popular blog platforms out there. Now the discussion in that feature request included a solution that fits with my requirements, a feed for one tag. Create a template for the feed, and set it to pull in the tag I want a feed for. However not being able to use the plugin that already generates the feed for my site annoyed me, and never underestimate the motivation of an annoyed sysadmin. Now the beauty of open-source software is that if you don’t like it you can change it. So I pulled down the code, and started working on making it do what I want. Alas I’m not very good with Ruby, so it took me some time, but I did eventually manage to cobble something together. It did what I wanted, and I also built to be able to generate feeds for a subset of tags or all tags if you wanted. So now I had code, not very good code mind, that did what I wanted and that at least some others wanted, the nice thing to do would be to share, so I opened a pull request both to share my efforts, and in the hope that I may be able to get help improving my code.

posted at 08:56:00 PM on 19 Feb 2019 by Craig Stewart

Tags:jekyll sysadmin blog open-source