The McDev Blog

Kevin McKelvin's perspective of the Ruby world.

Migrating to Octopress

I’ve been rather quiet lately, but over the last couple of weeks I’ve been determined to revisit my blog and spiffy it up a bit.

I have been unhappy with Wordpress as a blog engine for a long time. I’ve been looking for good alternatives - to the point that I had even written my own blog engine using Rails. @iFrankZA pointed me to Octopress and I realized that this was the tool I had really been looking for.

A few things I really like about Octopress:

  • All posts are written in Markdown
  • It’s all static HTML (Huge scalability)
  • Adding new content is dead easy using rake tasks
  • It’s Ruby!

To migrate from Wordpress to Octopress, exitwp came in really handy. It converted all of my posts from Wordpress into Markdown with the headers that Octopress expects.

I encountered a few issues around encoding of UTF8 characters when generating the Octopress site, but adding the following lines to my .zshrc fixed my problem by changing the default encoding from ASCII to UTF8.

export LC_CTYPE=en_US.UTF-8
export LANG=en_US.UTF-8


My favourite part of Octopress is its deployment model. Because the whole site is generated into HTML, I can use rsync to deploy any new content to my web server over SSH. It just needs a slight modification to the default Rakefile:

ssh_user       = ""
ssh_port       = 22
document_root  = "~/"
rsync_delete   = true
deploy_default = "rsync"

Then deployment is as easy as running rake gen_deploy