I’ve been missing my old Wordpress programming blog, but I no longer have a dedicated server with which to run Wordpress on. Obviously you can set up a free blog but I’ve been wondering if something like Github could do static site hosting.

Turns out it is true! Github-Pages can publish and host static websites, which is perfect for programming related projects and repos. This post is the result of setting up Git, Jekyll, Ruby, and Bundler on my 10 year old iMac.

My interest was initially piqued by this TeamTreeHouse post talking about hosting a site on on Github with your own domain. Then I was thoroughly convinced by a detailed write-up: Goodbye WordPress. Hello, Jekyll! by someone in the exact same self-hosted boat I was in.

The GitHub Pages Help has more info on how to get Jekyll working with GitHub.

Local Webserver

Since Jekyll is an entirely text-based templating engine running on Ruby, you can preview the compiled website locally before committing and publishing to Github. By running the following command in terminal, the website can be previewed at http://localhost:4000

bundle exec jekyll serve

Jekyll supports Markdown for formatting text, making it easy to create polished content quickly, like that code formatting above!

If you’re curious to see how the files work behind the scenes, check out the Github repo for this site.