Blogging like a developer
I write a lot of articles, I have normal pages illustrating my service and training offers, articles and blog entries. Even worse, I want to provide the core pages in English and German language. The nice thing is that I found a flexible and efficient solution to manage this.
In this article, I will explain why Jekyll is the perfect tool for software developers.
<i>Some italic in pre</i>
package de.gad.gfw.web.graph.model; /** * Created User: xgxthen Date: 16.03.2010 */ public interface Connection<N extends Node> { String getLabel(); N getSource(); N getTarget(); }
Old tools
Before, I have used a content management system which was build with php and mysql. I added a blog using Pebble as Java based blogging engine. Most of my articles are
written in Open Office.
Publishing a technical article required the following process.
- Create a new page in the content management system
- Copy Open Office document and paste it into the CMS (web based)
- Clean the HTML
- Upload images and fix image links
- Upload PDF of the document (I always provide the articles as PDF as well)
My intention was to minimize the effort.
What is Jekyll
It is a blog aware static site generator. This means that it takes a raw-document and apply a template to it to generate a static HTML page.
Blog aware means that it supports things like categories, tags etc.
Jekyll is written in Ruby and supports Markdown, Textile and plain HTML as format. Markdown and Textile resemble WIKI syntax. You may include HTML inside of
those files which is pretty nice.
In addition Jekyll can use pygmentize to highlight nearly any kind of source code.
Cool process of writing stuff
In the Old Tools paragraph I had a number of steps to publish an article. I shrinked those steps three tiny steps, which are just quick shell commands.
- git add *
- git commit -a
- git push
As Jekyll is file based, you can put all the files into a Git or Subversion repository. When adding an article, I just add it to the repository, commit the changes and
push them to the server. If you use SVN then the commit will automatically include the push to the server.
On the server there is a hook which executes a script to generate the website. I don’t think that there is a faster way for a software developer to blog or to publish articles.
Why Jekyll?
First I considered Pebble as unique tool for the pages. Pebble is a very nice blogging engine, which I used for a couple of years now. It is incredible stable and works like a charm.
There are a number of reasons why I switched to Jekyll.
- I am always interested in new technologies.
- Jekyll is Ruby based and simpler to adapt to my needs than a Java solution. I am both a Java developer and a Ruby developer. Ruby is incredible efficient for small tools.
- Jekyll supported normal pages (not blog entries) in a better way then Pebble does
- Jekyll supports different formats to write blog entries. I currently prefer Textile but you may use Markdown as well or just plain HTML.
Links
A page which encouraged me to try Jekyll
Best Regards / Viele Grüße
Sebastian Hennebrueder