Blosxom: Upgrading to an RSS 2.0 Feed

Blosxom still pretty much just damn works, but it’s dying. A dead News link on a project site is never a good sign. It won’t be long before the STP will have to move to another weblog backend, but that’s for another day.

Today’s issue: Facebook keeps inexplicably dropping my RSS feed. Facebook is of course happy to pretend there isn’t an internet outside its walls, but I get a lot more feedback on my ideas through Facebook than in the blog comments. Whether it’s the cause of this problem or not, in keeping with its age, Blosxom serves feeds in the RSS 0.90 format, which would be a bit of a ColecoVision even if Blosxom had ever done it right.

I’ve modified my copy of the blosxom.cgi script to produce a modern RSS 2.0 feed that validates correctly. You can do the same. Here’s how:

1. Open blosxom.cgi in a text editor and scroll to the bottom.

2. Replace this rubbish:

rss content_type text/xml

rss head <?xml version=”1.0″?>\n<!– name=”generator”

content=”blosxom/$version” –>\n<!DOCTYPE rss PUBLIC “-//Netscape

Communications//DTD RSS 0.91//EN”

“http://my.netscape.com/publish/formats/rss-0.91.dtd”>\n\n<rss

version=”0.91″>\n  <channel>\n   

<title>$blog_title $path_info_da $path_info_mo

$path_info_yr</title>\n   

<link>$url</link>\n   

<description>$blog_description</description>\n   

<language>$blog_language</language>\n

rss story   <item>\n   

<title>$title</title>\n   

<link>$url/$yr/$mo_num/$da#$fn</link>\n   

<description>$body</description>\n  </item>\n

rss date \n

rss foot   </channel>\n</rss>

3. With this rubbish:

rss content_type text/xml

rss head <?xml version=”1.0″?>\n\n<rss

version=”2.0″>\n  <channel>\n   

<title>$blog_title $path_info_da $path_info_mo

$path_info_yr</title>\n   

<link>$url</link>\n   

<description>$blog_description</description>\n   

<language>$blog_language</language>\n

<generator>blosxom $version</generator>\n

<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n

rss story   <item>\n   

<title>$title</title>\n   

<pubDate>$dw, $da $mo $yr $ti:00

GMT</pubDate>\n   

<link>$url/$yr/$mo_num/$da#$fn</link>\n   

<guid

isPermaLink=”true”>$url$path/$fn</guid>\n   

<description>$body</description>\n  </item>\n

rss date \n

rss foot   </channel>\n</rss>

That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *