Daniel Ngu

Octopress

General maintenance related tasks:

Upgrades
1
2
3
4
5
6
7
8
9
10
11
$ rvm get stable                 # RVM
$ rvm install 2.2.3              # Ruby
$ rvm --default use 2.2.3        # Set default version
$ rvm rubygems latest            # RubyGems
$ gem install bundler            # Dependencies
$ bundle install                 # Run within blog directory
$ rvm -v                         # Check versions
$ ruby -v
$ which ruby
$ gem -v
$ which gem

Arch uses Python version 3, whereas Octopress requires verions 2. Edit the first line of mentos.py to the following instead:

~/.rvm/gems/ruby-2.2.3/gems/pygments.rb-0.3.4/lib/pygments/mentos.py
1
#!/usr/bin/env python2

Migrating to another computer:

Install RVM
1
curl -L https://get.rvm.io | bash -s stable --ruby

Then do the upgrades as listed above.

Clone blog
1
2
3
$ git clone -b source git@github.com:username/username.github.io.git
$ cd username.github.io.git
$ git clone git@github.com:username/username.github.io.git _deploy

Install the dependencies as listed above.

To maintain the blog on multiple computers:

Push on one:

Push
1
2
3
4
5
$ rake generate
$ rake deploy
$ git add .
$ git commit -a
$ git push origin source

Pull on the other:

Pull
1
2
3
$ git pull origin source
$ cd ./_deploy
$ git pull origin master