Stack Builders News

A collection of thoughts and notes by our team


Emiliano Zilocchi

Blog Hacking With Octopress


Octopress

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:

  1. Run a command to create a new post (this will generate a markdown template).

    rake new_post["title"]
  2. Open it with your favorite editor / IDE (VIM in my case).
  3. Create some content.
  4. Start the Octopress server.

    rake preview
  5. Test how it looks like in any browser.

  6. 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.

    rake deploy

Last but not least, you can deploy it on your github account making use of GitHub pages. This means free hosting that is easy and well-documented.

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 :).

comments powered byDisqus

Do You Have What it Takes To Be a Stack Builder?