Apr 2010

Is coding blog engines funnier than writing in them? (plus dirty stuff about this blog)

As I just mentioned, I’ve been in a passive-aggressive relationship with my blogger alter ego. There are many reasons to that, but one is more interesting to me:

I enjoy more writing blog engines than writing blog posts.

I’ve been using Wordpress most of the time, for which I developed some themes (most of them lost, but I just keep the last two). Then, I’ve coded blog engines in PHP by myself (the source code is lost), using Rails (never finished) and Sinatra (first version using a database and coded from scratch here). I’m sure I forgot some weekend projects done some years ago.

And now, this one. What’s special about this blog? Well, it’s the latest. And the prettiest. And is build as a Sinatra application using Git to store the posts. I discovered Nesta a couple of months ago thanks to the Peepcode blog. I cloned it and built this blog on top of it. I took the look and feel I already designed in my latest Sinatra blog (the one with the database that never got to see the sunlight) and voilà.

Besides from loading all the content from static files (pushed via Git), this blog features an awesome non-existent admin section, some very nice page caching (using the neat sinatra-cache extension by Kematzy) to prevent loading the Ruby stack, a feed and a sitemap. Oh, and the content is formatted using Markdown (almost everywhere) and Haml (where the layout may be trickier). For the stylesheet generation, Haml’s sister is used: Sass. There’s some code highlighting capabilities thanks to highlight.js.

There is one feature I haven’t implemented yet, but will do soon: comments. This blog now is using no database to work, and everything is page-cached when the first request arrives, so a traditional comments functionality would fuck everything up a little… unless I use some service like Disqus or Itense debate. I don’t like these services (if there’s a better alternative, please tell me), so I will have to code some mini-disqus-like web-service to feed my own blog’s comments. I’ll keep you posted.