I decided to start working on my personal website again, and as an exercise I decided I’d create my own theme etc. as a way to learn Hugo. I am purposefully limiting the styling and use of JavaScript to create a very minimalist look and feel.
Despite it’s popularity, the documentation for Hugo, even though there is a lot of it, isn’t all that great. You actually have to learn the templating language, as well as get a handle on the variables etc. etc. and I am sure there are many, many nooks and crannies to explore. There’s even a diagramming system built into Hugo, which might be interesting to play with, because it converts ASCII art into the following.
Overall Hugo looks very promising though like all software it has bugs and quirks, mostly related to the scripting and incremental caching.
One interesting observation is that overall, this problem domain hasn’t changed much over the years. I wrote DynaWeb
nearly 30 years ago, which converted XML into HTML on the fly by using stylesheets. It was arguably the first server
it’s kind, and one important part of it, apart from stylesheets (which used text-before
and text-after
to drive the
conversion), was page templating. I’ve also written a number of Content Management Systems (CMS) over the years, including
my own static site generator.
It’s surprising in some ways how little the concepts have changed: you still have layouts, partials and content, and while the templating engine syntax, scripting support, and separation of code from templates all differ, at the end of the day, they all end up solving the same problem in much the same way.
That’s actually the story of programming in general: the solution is shaped by the problem, and if you really understand the problem well, then the solution space is constrained so there are only a few patterns that naturally emerge.