Note: This page is about the original wiki code, written in Perl. I’m not using it any more, but the current Lua site generator (the code for which is not yet online) is closely related to it.

Download or browse the code.

I’m running this site on some home-grown code I wrote in 2005 and have been tweaking (mostly slightly) since then.

I’ve been updating it quite a bit recently as I’ve moved to a much more sensible page storage mechanism – and one that works on case insensitive filesystems, like on my Mac – and I’m planning to work on code to push pages to Blogger.

The code is pretty simple, but it requires some non-trivial Apache server configuration to make it work. Since configuring Apache is everyone’s favourite party game, I thought I’d help out in the fun by writing a shell script that generates all the necessary configuration for multiple domains (virtual hosts). It even seeds new wikis with a basic set of pages.

The wiki and configuration code is bundled together.

The existing Git backend is pretty fragile. I don’t do error checking, so when something fails it often fails silently. Generally problems only arise when you’re doing something goofy like sharing a set of pages between the web and the command-line, because you need to run some sed scripts on the markup... I’ve yet to completely solve the permissions problem, but I think it requires doing this

  # chown -R www:www ${pagedir}
  # chmod -R g+w ${pagedir}

and then adding yourself to the www group (or whatever gid it is that Apache runs on on your system.)

To work reliably this depends on having the BSD semantics of group write bits: namely, that files created in directories having the group write bit set inherit it. This propagates the group writability, which is what allows you to share with your webserver. OSX definitely has this, as do all the BSDs. I’m not sure about Linux these days – it used to be a mount option. Maybe it still is?

It also requires that both the server’s and your umask be set to 002. The wiki does this; but you still have to do your part. I put it into my .bashrc.

The neat thing is that all of Git’s branching and merging machinery (which is frankly awesome) is available for dealing with changes to pages.

Enjoy. If you try the code, I hope you enjoy it. At least a little. ;-)