Making the most of blog comments: Part 5 - 'Recent comment' RSS feed template for Movable Type
I've been writing a series of posts looking at the best ways to implement comments on blogs. Although one of the often championed features of the blogosphere is the 'conversation', not all blogging platforms make it easy for users to track their part of the conversation.
One way to facilitate that is to provide streams of the comments added to a site in the RSS format. Although there doesn't seem to be a huge take-up for this kind of information at the moment, the additional overhead of publishing comments in this format is negligible, and it is quite easy to do.
Here is how to make a comments RSS feed for the Movable Type platform.
RSS 'Recent Comments' template for Movable Type
The version of Movable Type that I use on currybetdotnet, the antiquated 3.2 edition, did not come with a default template for an RSS feed of 'recent comments'. As a result, I've adpated a Movable Type template from Michael Hanscom's Eclecticism site.
The most prominent change I've made is to edit the title of each item to say 'Comment by author name on post title'.
This has two purposes. It makes it clear that this is a feed of comments from the blog, not of posts from the blog. If you go on to make a combined feed of posts and comments, it is good practice to differentiate between the two types of content.
Secondly, including the name of the commentator prominently in the feed increases the chance of the relevant content from your feed being picked up if someone is searching for people by name in services like Bloglines or Google Reader.
Turning the template into a feed
If you've never made a new index template on Movable Type before then, in the words of Douglas Adams, don't panic. It really is quite a simple process. The following steps describe specifically how to do it for Movable Type version 3.2, but it is a similar process for all previous versions of the software.
Once you are logged onto your blog, click the 'Templates' link in the left-hand navigation.
Then select 'Create New Index Template'
You need to provide some basic details for your template. The name of the template is something that you will only see internally in Movable Type, so it can be anything you like. However, it is always best to describe a template in a way that accurately explains what it does. I chose 'RSS Comments'.
You also need to pick a filename for the RSS feed itself. This will be published on your blog. It is important to make it unique - I chose 'comments.xml', as it is self-explanatory. You should make sure the filename ends in .xml as this will ensure your server delivers the file in the right format so that it can be identified as an RSS feed.
Next, you need to cut-and-paste in the template code from earlier in this page. It needs to be placed in the large textarea within the Movable Type interface marked 'Template Body'.
One important point is that you need to make sure that the checkbox 'Rebuild this template automatically when rebuilding index templates' is ticked.
Finally, click 'Save', and your new template should be complete and published. To verify it is there try and visit http://[your-blog-domain]/comments.xml, and your browser should try and do what it normally does when pointed at an RSS feed - i.e. load the XML or offer to add the feed to your 'Live Bookmarks' and so on. Obviously, substitute comments.xml for whatever you called the Output File earlier, if it was something different.