Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at

hpr1370 :: Blogging With Octopress

Using Octopress to create a blog with tools already familiar to you as a hacker.

<< First, < Previous, , Latest >>

Thumbnail of Tony Pelaez
Hosted by Tony Pelaez on 2013-11-01 is flagged as Clean and is released under a CC-BY-SA license.
Blogging, html, Static HTML, Website. 2.
The show is available on the Internet Archive at:

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:25:11


Blogging with Octopress

Static html site generators automate many of the tedious steps that are necessary to create website. Octopress is a static html generator that automates many of the tedious tasks of static html site generators, and comes with a number of reasonable presets, configured right out of the box.

Static HTML Site Generators I looked at:

I settled on octopress for the following reasons:

Sass adds additional functionality to css such as variables, mixins, scopes, and was a tool that I had previously worked with.
Twitter Bootstrap
Twitter bootstrap is a set of templates that produce nice looking pages that are standards compliant, and adaptive so that they look good at any screen resolution.
HTML5 Video Plugin
I ended up creating my own, but Octopress has a HTML5 video plugin. Unfortunately this only supported H264 video, so I created my own to serve H264, Webm, and Ogv.
Deployment scripts
Octopress comes with rsync, and github pages support out of the box, so you can deploy your site with very little effort.


  • Ruby 1.9.3 or above
  • Git
  • HTML knowledge
  • Text Editor & Terminal

Install Requirements:

In Ubuntu 12.04 I did the following:

sudo apt-get install emacs git zlib1g-dev openssl libopenssl-ruby1.9.1 \
libssl-dev libruby1.9.1 libreadline-dev

Install ruby through rbenv

rbenv (

git clone ~/.rbenv
# set environment in ~/.bash_profile.  Change this to ~/.zshrc if using zshell
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile # You can change to .zshrc or .bashrc

Install ruby-build to make installing ruby easy

git clone ~/.rbenv/plugins/ruby-build

Install ruby

rbenv install 1.9.3-p194
rbenv rehash


Install Octopress

git clone git:// octopress
cd octopress
rbenv local 1.9.3-p194  

Install Ruby Requirements

gem install bundler
rbenv rehash
bundle install  

What is rake?

Rake is like make but for ruby.

Use rake scripts to setup and preview blog

rake -T # list all available rake tasks
rake install # install themes and default config
rake preview # generate and view site

Open localhost:4000 in your webbrowser

Setup Deployment

rake set_root_dir['blog-test']
rake setup_github_pages 
rake generate
# Change the following url to point to your repository
git remote add origin
git config branch.master.remote origin
git add .
git commit -m "initial commit"
git push origin master
rake deploy # this is where the magic happens

Configure Blog

emacs _config.yml
# Edit title, author, subtitle

Create First Post & Basic workflow:

rake new_post
emacs post
git add .
git commit -m "added new post"

Publish Blog

rake deploy


Subscribe to the comments RSS feed.

Comment #1 posted on 2013-11-01 19:56:38 by Windigo

Excellent first episode!

First of all, congrats on making the transition to contributor!

I've always been a little curious about static publishing. I'm aware of the various technologies involved separately, but didn't know much about how they're used together to publish sites.

Thanks for the introduction, and extensive site notes. When I finally get up the motivation to try it out, I'm starting here. :)

Comment #2 posted on 2013-11-04 06:23:10 by Tony Pelaez

Re: Excellent first episode!

Thanks for your feedback @Windigo, listening back to this episode, I think I could have included greater detail in the audio. I hope to have time to create an accompanying screencast soon. That being said, the commands you see above will get you up and running with a website on github. It also helps you get your mind around how this is done if you have a little knowledge of standard ruby tools such as "rake" and "rubygems".

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?