I wanted to create a blog using github pages, but despite looking in all the obvious places I couldn’t find a simple set of instructions all in one place that explained how to do this.

Sigh. Cue neverending redirect from one site to another saying I needed to do this, that or the other first. This would probably be easy if I used ruby and had it and rubygems already installed, but it’s been years since I’ve done anything with it.

I use Ubuntu as my distro of choice and started out from a vanilla Ubuntu (an OpenSSH server install).

Github Pages

Github Pages uses jekyll. To use jekyll you need ruby. I had tried the apt-get route before and had problems, so decided to build form source.

Install Ruby From Source

Here’s how to do that:

sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
tar zxvf ruby-2.3.0.tar.gz
cd ruby-2.3.0/
sudo make install
cd ..
ruby --version

Check the output is 2.3.0:

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]


Again, from source:

sudo apt-get install git
git clone
cd rubygems/
ruby #

Github Pages

Now it’s easy

get install github-pages

Creating Github Pages Site

This was easy - I had already created a github repo Here’s how I created the jekyll site (obviously change all the piersfinlayson stuff to your own github account and pages site):

git clone
jekyll new .

Next I edited _config.yml and entering the info about my site.

First Post

Finally I did:

cd _posts

And then modified the sample post already there and turned it into this one.

Running jekyll

The usual instructions tell you how to run jekyll to serve pages up on localhost. Not much good to me with a headless virtual Ubuntu instance. So here’s how to expose externally:

cd ..  # Back to ~/
jekyll -serve --host

Job’s a goodun. All that’s left is to push this to github and it should be visible publicly.

comments powered by Disqus