Blogging software

I agree with Joey: weblogging software should not rely on a CGI script to produce RSS output, that's silly. And I'm still using blosxom... uh?

Well, blosxom has this neat static output thingy. In my /etc/blosxom/blosxom.conf I have, amongs other things:

$datadir="/var/local/blosxom";
$static_dir="/srv/www/grep.be/data/blog";
$static_password="foo";
@static_flavours=qw/rss php/;
$static_entries=1;

And then I have a /var/lib/svn/blog/hooks/post-commit that looks like this:

cd /var/local/blosxom
svn up
for i in $(svnlook changed /var/lib/svn/blog | awk -F' ' '{print $2}')
do
  touch -d "$(svnlook date /var/lib/svn/blog -r $(svnlook history /var/lib/svn/blog $i | tail -n 1 | awk -F' ' '{print $1}') | sed -e 's/(.*$//' | awk -F'(' '{print $1}')" $i
done
/usr/lib/cgi-bin/blosxom -password='foo' -quiet=1

(the whole svnlook crap is to make sure a file doesn't get a different date set on it when I make an update)

So I can just 'svn commit' anything, and it works. One note, though: make sure you don't use .txt as your blog entry file extension (can be set using $file_extension in blosxom.conf), because .svn directories contain little files called README.txt in them, which you probably don't want to see in your blog...

(on a side note, I find the whole static password thing pretty pointless; if you're logged in to a system and have write access to whatever blosxom writes to, it's probably too late to block it using a password anyway; and if you do not have write access, then knowing the password isn't going to help you...)