Manuel Ohlendorf

Things from and about me

Using Hugo as the new static site generator

Posted at — Feb 17, 2015

Four years since my last blogpost and a very crappy old style of the site, I have decided completely revamp it.

My first thoughts were: You need a new static site generator and it has to be written in your favourite programming language (for now, this is JavaScript). After some googling and tinkering I came to a very different conclusion: Not the programming language or the features of the generator are important to me, but the available themes!

So more googling was necessary to come up with Hugo and the theme Hyde and not 10 minutes later the new site was online - yes, it was that fast!

Hugo has every feature you would expect from a static site generator: sitemap generation, RSS generation, serving and life-reloading during development and a good documentation.

But the most important feature for me is the very good theming mechanism that allows you to use a theme as a git submodule in your project, without changing any code in it. It is always possible to update the theme to the latest version or even change it to a different one. Every style specific changes that you want to make happen in your own templates.

Another property of Hugo that convinced me, is its performance - Hugo is blazing fast! Generating this site takes about 25 milliseconds.

One thing, that bothered me was, that the Hugo’s documentation describes a very complicated way of hosting the blog on Github. Therefor I have chosen my submodule-way, again.

Hugo generates the final site into the public folder. That is where you want to init the submodule into:

$ git submodule add public

Now every time the site is rebuild, you can commit and push the changes to the website repository and github will automatically publish them - in my case to

That’s it again - a new site generator and a new blogpost! Probably the last, though, until I change the site generator again…