Blosxom and RSS
Posted on January 6th, 2004 by ivo
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
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>).
Oops!
Oops, obviously those were supposed to be and . I guessed wrong as to how blosxom would handle brackets in a comment.
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.