It’s time to say “good bye” to an old friend

I first purchased my own web hosting back in 2006, with the folks at Brinkster. I was an asp.net developer at the time, and after using their free educational hosting package whilst at university I decided to stay loyal.

Things have moved on a lot since 2006. I’ve re-written my personal site more times than I care to imagine. I’ve tried various ideas out. I’ve used my hosting as a “dumping ground” for on-the-side projects and technical challenges. The truth is, I’m paying for something I don’t use.

I’m a big fan of GitHub. I have several open-source projects hosted with them, and recently have thought “why not open source my web site?”

Enter GitHub Pages

GitHub Pages are free-to-host, static web sites. You can have a repository for your GitHub username, and therefore a free, static web site. GitHub Pages also support Jekyll, a blog-aware, static site generator, written by one of the founders of GitHub. A free-to-host, blog aware site? Yes please!

How on earth do you migrate a blog to GitHub Pages?

My blog used to be on WordPress, which I still regard as one of the best blogging/CMS software packages around. Therefore, I’ll be basing the following on an export from WordPress, but the steps are going to be pretty much the same regardless of where your content comes from.

Before exporting a site and importing to GitHub Pages, it is always a good idea to plan out the series of steps that need to take place and ensure that anything your blog depends on (such as a custom domain name), are in place or at least editable.

Here’s what needs to be in place before we can begin:

Quite a list, but now the fun begins. Perform the following to import your blog to GitHub Pages:

If you are using a custom domain (aaronallport.com in my case), create a file called CNAME (no filename extension) in the root directory of your Jekyll site. It’s contents need to be the exact domain you will use to access your site. In my case, it’s “aaronallport.com” (see this for yourself at: https://github.com/aaronallport/aaronallport.github.io/blob/master/CNAME)

Next, using the GitHub client on your system, commit all files to the .github.io repository.

You now have a GitHub Pages site. It can take up to 10 minutes to generate, and will be accessible in your browser at .github.io

How do I point my custom domain to my new GitHub Pages site?

This one is easy. Navigate to the control panel for your domain name you wish to use (and you’ll have specified in the CNAME file created earlier).

DNS changes take a while to propagate (mine took about 4 hours or so).

I’ve hit an issue

My best advice is to check out the GitHub documentation, found at: https://help.github.com/articles/using-jekyll-with-pages

Custom domain instructions are found at https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages

Also, there is a good article on the DNS side of things at: http://donalfarrell.com/2012/07/13/Setting-up-GitHub-redirects.html

A free blog

You’re the proud owner of a free, static site/blog, powered by GitHub and Jekyll. Yes, your site is now open-source, but it would be nice to show them some love.