Please notice: This article is more than 3 years old
Content, Source code or links may no longer be correct in the meantime.
Please notice: This article is more than 3 years old
Content, Source code or links may no longer be correct in the meantime.
At the beginning of the (first?) Corona lockdown in March 2020, I was advised during an nightly Jitsi meeting by a befriended admin from Hamburg about giving Hugo a chance. Probably just after I dropped a rant about Rapidweaver, my previous static site generator on the Mac.
The idea needed to grow for almost half a year, till August, when I finally found a test balloon for Hugo: My personal blog and if everything succeeds, my official website, which is slowly getting rusty.
Though I wouldn’t call myself a Hugo expert (yet), here comes a first insight, a making of and some of my considerations and challenges I had during the development in the recent days.
Hugo is a Static Site Generator. In other words, all contents of a website are created locally on a development machine and then uploaded to a web server.
This makes it fundamentally different from the numerous online-based content management systems. Generally speaking, content management systems are regarded as a more advanced development and are used today by practically every advertising agency and companies for implementing websites. I find it quite difficult to follow this narrative. In many cases there is no way to talk of further progress. Especially when content management systems are often “misused” as a business application for something they were never created for.
First let’s look at the advantages and disadvantages of static site generators in general, Hugo in specific and my personal requirements regarding a website:
Actually I can’t name any more disadvantages. Have I forgotten any? Please give me feedback via email.
As far as the design is concerned, I have chosen a appropriate theme from the theme gallery as a basis for further customization.
From a purely visual perspective I liked “Kiss Em” by Pavel Pi from the very first moment. He developed it as fork of the “Kiss” theme, which again is based on the theme “Hemingway”. I was not aware of the implications that resulted from this forking.
The installation of Hugo is straightforward. The first website with the theme created in a few lines and the config.toml quickly adapted. The tutorial by Thomas Leistner 1 has been very helpful to get started.
I used GNOME Builder as project and markdown editor.
The disappointment occurred with the sight of the first online tests and the requirement to get into theme customization much sooner than expected. In addition to the reported issues, there were of course colour adjustments and included webfonts as well as adjusted tap spacings of the navigation controls.
This is where it seemed a bit of a mistake to have chosen a three times fork as theme for the first steps. The search for the appropriate CSS style sheets was very time-consuming, as it was necessary to find the way through the numerous unused and yet inherited styles.
Also the partials had to be tackled. When I tried to add an English version to the already completed German language version, I noticed that it was constantly jumping back to the German version. The Hugo concepts and necessary Go statements haven’t been implemented in the theme. So I spent half of a day (with the typical interruptions) working on the English branch.
These experiences should not reduce the overall impression of Hugo. I look back to a couple of wonderful and productive days. Finally I have a modern blog now.
I especially like the possibility to use Go to perform previously complicated tasks quite smoothly. Here’s an example for Pipes:
{{ $style := resources.Get "css/main.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
With Rapidweaver this required manually digging through the CSS with the yui-compressor after each build and creating the fingerprints of your own from the console.
A migration tool for Rapidweaver seems not to exist, but there are a lot of tools for other content management systems2.
Hugo as a static site generator is very powerful and can accomplish a job. And yes, I will use it for my official company website soon.
However, before that happens, I want to see my deployment workflow fully automated.
Your Tomas Jakobs