Scott Watermasysk

Still Learning to Code

RSS Feeds for Graffiti Tags

Or put another way, when a feature does not really exist.

I always thought Graffiti had support for RSS feeds per tag. But it turns out that while we have RSS autodiscovery for these feeds, they are never generated by Graffiti.

A couple users pinged us this week about this feature. Unfortunately, it is not on the current feature roadmap, so I figured I would put together a simple example and publish it here.

If you would like to add support for RSS feeds per tag within your Graffiti site, you can now download the this httphandler. To use it, just unzip it and add the tagrss.ashx to your site (I recommend the root). Then it is just a matter of adding a “tag” querystring to it. For example, all of my posts on Windows Live Writer can be found at http://scottw.com/tagrss.ashx?tag=wlw

This is very simple implementation that is roughly a copy & paste job of some existing code. It does handle caching, filtering by the last 10 results, and 304 status codes. Unfortunately, at this moment, it does not honor category permissions. So if you have public and private categories, this example is not for you.

Finally, if you find the url above a bit fugly and would have access to a rewrite component like ISAPI Rewrite, you can add the following rule: RewriteRule ^/tags/(.+)/feed/ /tagrss.ashx?tag=$1 [NC, L]. With this in place, the tag url above can be accessed at "http://scottw.com/tags/wlw/feed/ which falls in line with the rest of Graffiti (you should be able to achieve a similar result with ASP.Net Routing or URL Rewrite module for IIS7).

Update:
Since I am no longer running this site on Graffiti, the links to this site above will no longer work.