A Hacker's Framework for Blogging

February 08, 2009

Customizable and Quick

I wanted to redesign my blog and host it on my VPS, but two obstacles stood in my way. First, I had been using Wordpress, but had no desire to dig into the tarpit of Wordpress theme design. Second, I wanted to use Ruby, but didn’t care for the overhead of running Typo, Mephisto, or even an improvised Sinatra- or Camping-based blog engine.

Solution? Webby.

Webby is a static site generator written in Ruby. It employs many of the conventions familiar to Rails programmers (templates, partials, and layouts), with your choice of templating languages (erb, haml, textile), and syntax highlighting (via Coderay or Ultraviolet) baked in.

Webby also includes some nifty finder methods and pagination, so the API feels like an ORM.

Advantages

There are several advantages of hosting a static html blog:

  1. Cached 100% and uses very little memory. This means that if you host on a VPS, you still have plenty of resources left for side-projects.
  2. Customizable. Use the templating language and code-highlighting plugins you like best.
  3. Freedom. It should go without saying that a static blog can be organized in innumerable ways. Tumblelog, photoblog, favorite quotes, etc.
  4. Compose with the editor of your choice. Hammer it out in Vim, and deploy with one command.

Sold?

You can download the source for this site from github.

Marc-André Cournoyer has a great article on his experience with Webby, Haml, and Sass. He’s written a monkey patch for pretty urls, which I’ve used on this site.

Also worth investigating are Webby’s documentation and tutorial and Mike Clark’s thorough writeup.

Having trouble installing Ultraviolet? Read this.

Finally, if you end up using Webby, or have any questions about it, or you’re just diggin’ the static html sweetness, feel free to drop me a line.

funky dingbat