David Ruttka

I make computers do things

Moving From WordPress to GitHub Pages Using Jekyll via Octopress

| Comments

Note: I’m going to assume you know what git and GitHub are if you’re considering using GitHub Pages.

GitHub Pages

I had said that I wouldn’t reproduce this part, since the existing documentation is so dead simple. But here goes.

  • Have a GitHub account. You probably already do, and that’s even better!
  • Create a new repo named {yourgithubusername}.github.io. So for me, it was “druttka.github.io”.
  • Put an index.html file in that repo. If you’re not sure what to put in it, “David Ruttka is the greatest blogger ever.” is more original than “Hello World!”
  • Navigate to {yourusername}.github.io. Seriously, other than waiting 10 minutes for it to propagate, that’s it. You’re done.

CNAME for the win

You’d probably prefer that people visit www.yourfancytendollardomainname.com, not yourgithubusername.github.io. There are a few ways to set this up, but I went with CNAME.

  • Go manage your domain.
  • Set the naked domain (@) and the www. subdomain (www.) to be a CNAME to {yourgithubusername}.github.io.
  • Back in your *.github.io repo, add a CNAME file.
    • In that file, put a single line. The single line should be www.yourfancytendollardomainname.com.
  • Navigate to www.yourfancytendollardomainname.com. Seriously, other than waiting 10 minutes for it to propagate, that’s it. You’re done.
    • GitHub Pages is nice enough to send traffic to whatever is in that CNAME file in your repo, regardless of whether the visitor tried to come in on the naked domain, the www subdomain, or github.io.

Octopress for another win that puts the previous win to shame

This is a little more involved than I want to write up right now. I will either update this post or create a new one later.

Update: I created a new one.

In the meantime, you won’t need to know Ruby, but you will need to know what it is and how to install it.