My jekyll workflow

Jan 08, 2014 | Comments

I just automated my blogging with jekyll with the following routines. My goal is to cut down on inputting a string of commands into the terminal using Rakefile and standard terminal commands.

Jason Seifer has an awesome Rake Tutorial for developers new to Rake.

My Github pages

I’ve set up my github pages to consist of two branches: source and master. The source branch consists of the entire project and as such tracks all changes. The master branch consists solely of the compiled site, which can be found in the _site subdirectory.

My Local environment




Main folder blog has 2 sub directories. which holds jekyll generated site content. holds jekyll raw files such as posts, layouts, _includes etc.

My workflow

Automate terminal commands by adding the following alias into .bashrc file:

alias blogdir="cd /path/to/blog/"

alias build_blog=""blogdir; jekyll build; sudo cp -r /path/to/blog/* /path/to/blog/; cd /path/to/blog/; git add --all; git commit -m "Blogpost on ["Date"]"; git push origin master;"

alias bb="build_blog"

Move to jekyll raw files folder:

$ blogdir

Create new post with Rake:

$ rake post["Title"]

Previous command automatically fires up the default text editor for the file just created. In this case, i’m using Mou for .markdown file extensions.

Once i’m done with my blog, i’m ready to build and publish my blog by pushing into github pages repository, with a simple alias we made earlier:

$ bb

That’s it! So this is my 3 step process to publishing my blog, powered by Jekyll.

Special thanks to @leetucksing for introducing me this awesome blogging tool!

By the way, @athanhcong made an amazing app BlogWith which connects evernote to jekyll powered blogs and allows you to edit blogs directly on Evernote. Gona try how it works with jekyll later :)