How I Created This Blog
When I first started blogging I was using a Wordpress site that I hosted on my own, but came across an enlightening blog post from Julia Evans regarding putting your blog up on github and versioning it. Lately I had been wondering about how I could accomplish a very similar task having recently versioned andrewschutt.net using github. And some day that site is going to get it hosted on github as well. The benefit of having a site hosted on github is being able to simply issue a git push in order to publish a post. Oh, by the way you get to this all for the high, high cost of free.
First you will need to do a little setup for your system to getting going with a blogging framework called Octopress. As mentioned we will be using github for hosting of the blog, so, it will be necessary to have Git installed. Next we will need Ruby 1.9.3 or greater. Personally I use RVM to handle my multiple versions of Ruby.
To setup Octopress you will be using some git commands cloning down the code from github. From you terminal issue the following commands in the folder that you wish to keep a copy of your blog locally.
gem install octopress --pre
In addition to setting up Octopress you will need to get a new repo to host your blog brimming with fantastic ideas.
You now have Octopress setup and now it’s time to get a local instance of Octopress up and running locally.
octopress new blog-name
Open up a browser and goto http://localhost:4000. From here you are able to view your newly created blog.
Deploying blog to Github
We will be putting this site on into the
gh-pages branch of this repository in order to have it publicly available. Within the local directory
blog-name perform the following.
git add .
git commit -m "sterotypical msg for 1st post. lols"
git remote add origin firstname.lastname@example.org:your-username/blog-name
git checkout -b gh-pages
git push -u origin gh-pages
Edit the _config.yml
We have pushed to github, but will still need to make some minor tweaks to the _config.yml file to get thing working right.
Within the _config.yml file edit the line
baseurl: "" # the subpath of your site, e.g. /blog/ into
baseurl: /blog-name # the subpath of your site, e.g. /blog/
You also can edit some other fields in here to get you twitter and github username linked at the bottom of you blog.
Now comes the hard part. Typing up your thoughts and sharing ideas. Doing this consistently is difficult and easy to lose track of. Hopefully with this low barrier to posting will help encourage your blogging!