Blosxom and RSS

For planet Debian, this blog is being syndicated with others via RSS. It appears that Blosxom doesn’t automatically add a release date+time (the pubDate tag) to the RSS document. Mark Howard mailed me how to fix this: in blosxom.cgi, find the line starting with rss story in the __DATA__ section, and change it to (all on one line):

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
<description>$body</description>\n
</item>\n

3 Responses to “Blosxom and RSS”

  1. Better to Create a story.rss File
    I would suggest creating a story.rss file rather than changing the blosxom.cgi code. Changes to blosxom.cgi will of course be overwritten with upgrades; the story.rss will preserve the template. Just copy everything in there into story.rss and you’re done. I also recommend changing the <link></link> to the link directly to your posting, rather than to the link within the date page, so people can comment directly from there. (e.g., <link>$url$path/$fn.html</link>).

  2. Oops!
    Oops, obviously those were supposed to be and . I guessed wrong as to how blosxom would handle brackets in a comment.

  3. Thanks
    Thanks, I put it in the RSS template file (I’m using the theme plugin).

    And yeah, I changed blosxom to replace < with < and so on. I added a comment to the writeback template to warn about this.

Discussion Area - Leave a Comment