Chao's Random Thoughts

Keep looking, don't settle

Octopress and Github

This post documents how I set up this blog and the problems encounted. Octopress is quite popular recently and you can just find a huge number of bloggers who have written about how to set this up online. My main references are Setting up a blog on Octopress and github and Blog = Github + Octopress (In Chinese).

Ruby setup

Since I am new to ruby, I just follow others' instructions to install ruby by rvm. My first attempt was:

1
$ sudo apt-get install ruby-rvm

This turned out to cause some troubles in the following steps to install ruby 1.9.2. I don't know the exact reason because I am not familiar with ruby. This link contains detailed information to install rvm. Once it's installed, installing octopress following the offical guide should be straightforward.

Host on Github

This is very simple in Octopress. I mainly followed this, one thing worth mentioning here is during the step to enter the url of your repository after typing

1
$ rake setup_github_pages

Here, the repo must use the username/username.github.com naming scheme, see here

Writing posts with reStructuredText

As you may already know, I am a python fan. So I prefer rst to markdown. jekyll-rst is the plugin to add rst support to Octopress. After enabling the plugin, I changed default post ext in _confg.yml to rst. Code block in rst is quite handy to type.

1
2
3
4
def test():
    """Testing octopress"""

    print "this is so cool"

Comments