Welcome to My Octopress Blog

Yeah, switching my blogging toolkit again. This time I’m giving a try Octopress because it simply awesome :)

Previously I’ve blogged on yeevgen.wordpress.com and yviktorov.github.com.

Octopress is a framework designed by Brandon Mathis for Jekyll, the blog aware static site generator powering Github Pages

You can learn more about Octopress on it’s website, here I’d like to note the problem I noticed and share quick idea.

Problem

If you prefer deploy to Github Pages you’ll, according Octopress documentation, have the following branches in your repo:

* source
master

where source is where your Octopress blog source and master is where you deploy to.

NOTE: for users and organizations github build pages from default branch(you can set in “admin” tab) which can be differ from master.

And while it works well you’ll end up with unneeded source commits in master branch. This isn’t critical at all, but if you know how to omit those you’ll prefer to omit those and below is that “evil” knowledge:

mkdir my_octopress_site
cd my_octopress_site
git init
git remote add octopress git://github.com/imathis/octopress.git
git remote add origin your/repository/url
git symbolic-ref HEAD refs/heads/source
git pull octopress master

gem install bundler
bundle install
rake install

# adjust config's as you prefer
# commit your changes

mkdir _deploy
cd _deploy
git init
git remote add origin your/repository/url
cd ..
rake config_deploy[master]

# initial deployment
rake deploy

# make sure the following command used after initial deployment!!!
git push origin source

Idea

Since the days Github got it’s inline editor the Octopress has one disadvantage(over classic Jekyll) which might feel significant for lazy peoples and (IMHO) that’s would be nice to have a script and/or service hooking into github commits to deploy the changes instantly. Mind to make or share one? :D

Comments