← Back to Journal

Jekyll with Git and Hooks

Posted on 21 October 2011

Good bye my lovely Pyame… Hello Jekyll ! Pyame is my personnal static website creator written in Python under heavy development. These days I searched powerfull, light and easy to use static website creator, and Jekyll is arrived. Thanks God.

In short, these programs parse differents files written in a special syntax, for example : Markdown, Textile, etc. An easy syntax to make your articles or docs more swag. And it generate html output.

I love the usage system of Jekyll, Hyde, Pyame, Bonsai… more here. But the main incovenient thing is that you can’t write articles or docs through your website browser. And you need one of these generator installed on each computer you can potentialy write text.

But ! But ! Jekyll + Git + GitHooks are awesome !

Put your jekyll website into a git repo on your server, git clone it on your desktop, write articles, add, commit, push and githook will automaticaly execute jekyll rendering.

Desktop :

Server :

Jekyll

Jekyll installation is easy like trolling about proprietary software. Docs.

sudo gem install jekyll

Next ? I think you know how to install git instance. There are too many tutorials and docs on the Internet.

Githooks

Githooks are specials scripts which will be execute when git received, a push, a commit, an update… Look at your .git/hooks folder on your server:

A short description is present at the top of each files.

This is my post-receive file :

The pie on the cherry

Just write your files in a beautiful simple syntax with the best text editor ever, VIM, commit and push. Like a Boss.

LOVELY ?