Undertaker: blog

Moving to mako templates

Moving to mako templates

I've been using Undertaker for a month or so now, and it's proving itself to be fairly handy. In the course of that month, it's grown around the edges, in order to meet the needs that I have of it.

In particular, I'm working on moving my homepage over to use Undertaker. Previously, it was a collection of cpp(1) to generate the HTML and some perl scripts to generate RSS. Yes, really. It worked surprisingly well, and was fine, but I wanted to actually dogfood my own tool in a deep way, so this is where it starts.

As I was building this out, I had to make a technical compromise with myself: I needed a better templating engine than I had previously had in Undertaker. This was a bit of a bummer, as I liked the minimalist simplicity of the "template" system that the first cut of Undertaker used. But, when trying to build out a proper site, it just wasn't sufficient. In particular, it made transclusion really awkward.

After a bit of digging around, it seemed like lots of people were using Mako Templates for python. It was mature, stable, and still being maintained. Its syntax lends itself to keepign the simple things simple, while allowing more complex things. It's not as trivial as the old stuff was, but it's a lot more powerful, and allows for a bit more flexibility in the stuff I need.

That said, Undertaker is designed to provide you a "good enough" publishing system by default, which you can then rip out and replace trivially. So, there's nothing keeping you from importing a website you've already created in Jekyll or Hyde. You just need to replace the web/publish script with whatever makes you happy.

Undertaker is taking shape, which is great. The next big feature on my TODO list is collecting all of my projects into a single page without any more work on my part. This requires a bit of cross-project transclusion, which requires more fine-grained coordination than Undertaker currently does (mostly because it's been designed without a publishing engine in mind thus far). We'll see how that goes.