Mike MJ Harris

Adding an RSS feed


A number of people who I respect on twitter are quite vocal that blogs should have an RSS feed. I'm excited to announce, that as of this week, my blog too has an RSS feed! But what is an RSS feed, why do I need one and how did I add it to this project?

What is RSS?

RSS allows users to have one central place to read all their favourite blogs. It stands for Really Simple Syndication and is a standard, XML based way of exposing your blog content so that it can be read in a third party RSS app.

The benefit for a blogger is there's more chance that someone will discover and then regularly read what you write. One downside is that if you rely on advertising or care about data on how many people read your blog then providing all the content in the RSS feed means that users may not travel to your site. Neither of these matter to me so more than happy to provide a feed.

These two twitter posts below (both Sara and Stu, among others, regularly post about RSS) show the demand is out there and what consumers are looking for. The threads/conversations on both tweets are also worth a read.

Deciding on the features to add

These two tweets described what I needed to build pretty succinctly: create an RSS feed, provide the whole post in the feed and make sure there is a link to the feed on my blog.

Adding an RSS feed

Most blogging platforms either have RSS feed capability built in or available as a plugin. My blog is a beautiful handcrafted piece of code (or cobbled together bunch of JS libraries depending on your outlook) and as such adding an RSS feed was a manual process. Fortunately I already provide a list of all the posts in the blog as JSON. Creating an RSS feed meant mapping those fields to the required ones (I took Sara's feed as a blueprint), adding in some header content and converting it to XML. For that process I used XML2JS. I made sure the entire post was provided in the feed and there was a link to it in the main menu on my blog.

You can see the relevant piece of code on GitHub, here's pic of the feed and you can also see the feed in action here

Screenshot of xml feed


I find Twitter to be a very useful tool to discover how people are using various technologies. The tweets above prompted me to add an RSS feed and they also outlined all the functionality I needed to include. Doing this has been on my to-do list for a while - mainly because I thought it was going to be a bigger piece of work. Turned out to be quicker and more straightforward than I'd anticipated.

Pleased to have got the functionality added. Would love to hear from you if you do subscribe to the feed and any feedback on how the posts appear in your reader would be appreciated.


After sharing this post on twitter I got some additional feedback - as suggested by Mario I've added in a link tag in the header of the document.