Blog Hacking With Octopress
Anyone who has written a post about programming will certainly appreciate the value of having features that help express ideas in a clear way. I’m talking about tools that allow you to easily show a snippet of code or integrate GitHub repositories.
Some time ago, I started my own blog using WordPress, probably because it was the most well-known blogging platform and had the largest community. Just as I wrote my first posts, I started noticing that other developers were using Octopress (a tell-tale sign was the default skin). I decided to try it, and in under five minutes, I installed it and migrated one of my old posts. The results were very satisfactory. Octopress enabled me to write blog posts in the same way that I was accustomed to developing code; this made me very happy :). (Official installation page).
Installing Octopress is a very easy task, no database or server is required, just Ruby and Git.
Octopress is a blogging framework written in Ruby that makes use of the main advantages and common tools of the language (like rake and bundle). Actually it’s built on top of Jekyll and it is tuned with some plugins for writing programming articles. It is a well-made self-proclaimed “blogging framework for hackers.”
The main idea is to transform the way posts are currently written (usually with some word-processing editor or even plain HTML directly on the blog’s server) into a programming experience. To achieve this, in Octopress you write Markdown templates, a kind of meta language for HTML, that are then transformed into HTML pages that can be tested and deployed.
The regular workflow for writing posts is something like this:
- Run a command to create a new post (this will generate a markdown template).
- Open it with your favorite editor / IDE (VIM in my case).
- Create some content.
- Start the Octopress server.
Test how it looks like in any browser.
When your post is ready to be read by the world, it’s time to push it to your hosting server. With one command, your post is deployed into production.
To sum up, Octopress is becoming a favorite for personal programming blogs since it’s easy to install, easy to maintain and very cool to use :).