Simple web tools

Posted 2011.02.04

Synopsis: For a typical presentational, non-interactive website (like this one), distributed versioning and static site generators (like Poole) work great together -- if you don't mind a little bit of programming.

I've used a lot of different web-publishing tools over the years. In the 1990s it was hand-edited HTML. Then I wrote a Perl script (a crude precursor to Markdown) to "HTMLize" text files. By 2003 or so, I was trying out hosted services like Blogger, which were convenient because I had crappy dialup at home and did most of my Internet stuff elsewhere, where I couldn't SSH into my server. But a few years later I got DSL Internet at home, and then came GIT...

(For you non-programmers, GIT is an amazing tool which stores old versions of the files in a folder (just the changes, not a whole copy for each version!) and efficiently replicates the changes to other copies of the folder on other computers. You don't even need a server; you can do peer-to-peer. Unfortunately it's by and for programmers, so the rest of you will have to wait for something more refined.)

GIT* changes everything. Before GIT, the best practice for running a website was (and still is, for non-programmers) to use a CMS like WordPress or Drupal. CMSes are nice: several people (including non-geeks) can edit different pages at the same time, using only their web browsers. Drafts and old versions are stored in a database on the webserver. But these CMSes are big slow PHP programs with lots of things that can go wrong. I've tried custom-building simple CMSes with Django, and they are faster, but they're still clunky web apps. With GIT, several people geeks can edit the same pages at the same time on their own computers using their favorite text editors... they don't need a CMS on a webserver... they don't even need to be online (where was this when we all had dialup??)

* (and BitKeeper, DARCS, Mercurial, Bazaar, etc.)

One day in late 2009, I googled for 'git blog' and found Jekyll, written by a GitHub sysadmin. I tried it for a while, then went looking for something simpler and not written in Ruby. There's Hyde -- Jekyll written in Python, but still overkill. I tried Mako briefly, but realized I'd have to write an awful lot of glue code, or buy into the whole Python-docs ecosystem of Sphinx, SetupTools, ReStructuredText, Pygments, etc -- extreme overkill. I want a script, not a system.

Yesterday I found Poole, a little 400-line Python script with only one dependency, python-markdown. All it does is what I wanted -- it takes my input folder, converts the Markdown files to HTML, and copies everything else to my output folder verbatim. And it handles single-level tab menus, which I like. The blog feature wasn't quite up to snuff, but after a half-hour of tweaking it is. I'm pretty happy.

Now if only there was something like this for regular people. But the only thing you can take for granted these days is that they have a web browser...