Moved
I have moved my blog here (from posterous). My choice of [jekyll on] github pages was because I wanted something I can control - something that resides right here on my pc; something I can easily break, move and mess around with.
Fuck that. I chose github pages because it's like some cool 'hacky' thing. And 'hacky' is fun. But there are things I will miss. Autosharing on social networks and posting via email as examples.
Setting up Jekyll on Github pages
Setting up jekyll on github pages is a not a complex thing. Just few steps and you are done.
-
Create your github page
To create your page, simply create a new github repo with the name: [your username].github.com
-
Clone the repo
Cd to your choice directory and clone the repo with any name you want. I used blog
$ git clone https://github.com/[your username]/[your username].github.com.git blog
I'm cloning over https because my current connection sucks on ssh.
-
Install jekyll
Install jekyll. What jekyll does is to generate a static website from stuctured markup texts. You will need ruby installed already though. If not, that comes first.
$ sudo gem install jekyll
This installs jekyll and other dependencies. Really, if you know what you are doing (which you won't unless you've been doing this for a while), you may not need to install jekyll locally. Github runs jekyll on the server. It is however necessary if you want to run a local version for test, debug and development purpose.
-
Setup your blog
The interesting thing about jekyll on github pages is the power to design your site in whatever way easily. I went for a boring plain design that took just few minutes. A jekyll site has a standard structure of folders and files. Mine has just _layouts (the standard folder that contains layouts), _posts (the standard folder that contains posts), assets (contains css and images), index.html, posts.html and the config file _config.yml. See nettut's jekyll intro for details about creating this and content.
My _config.yml file has just a line specifying pygments for code highlighting.
pygments: true
I migrated my posterous posts using the posterous migrator that came with jekyll.
$ ruby -rubygems -e 'require "/usr/lib/ruby/gems/1.8/gems/jekyll-0.12.0/lib/jekyll/migrators/posterous"; Jekyll::Posterous.process(<my_email>, <my_pass>, <api_token>)'
I had to edit code sections for syntax highlight, fix image urls and "intra-blog" links within the post pages though.
-
Test
To be sure all is properly set, you can run jekyll locally.
$ jekyll --server --auto
--server runs a server on [default] port 4000 so you can preview your site via localhost:4000. --auto lets jekyll should pick up changes made to files so that you don't have to restart the server when you make any file change.
-
Push up
Once you are done just push up to github.
$ git add . $ git commit -m "--comment--" $ git push origin master
Your site should be live at [your username].github.com in few minutes.
So here (kehers.github.com) is the new blog. I still don't know if to embed a commenting system or not. But whatever.
Thanks to @AFOketunji, @damilare, @dpencilpusher and @micrypt for suggestions of blog alternatives.