Pat David Avatar

You Go Hugo!

I finally got around to updating this site to use my static site geneator of choice these days, Hugo!

In case you hadn’t noticed I’m a big fan of using Hugo these days (see:,,, and It’s does many things right and it’s fast, fast, fast (over 500 pages for this site, not including assets, renders in about 1.4 seconds)!

It also handles my content sensibly. That is, the site that is rendered will mimic the hierarchy used for the source files. For instance, this site has it’s content structured like:

├── posts
│   ├── 2021-03-07 Hugo
│   │   ├── hugo-wide-logo.png
│   │   └──
│   ├── 2021-01-08 Libre Arts
│   │   ├── LibreArts.jpg
│   │   └──

And I can expect my output to follow a similar pattern. This doesn’t seem like a big deal for a simple site like this one but it makes life much easier when building something a little more complex like LibreArts.

The overal transition was relatively quick. The hardest part was migrating old posts that I had poorly managed once upon a time. Like a fun archaeological dig the further down (back) I went into the archives the more insane I think past-pat was.

On top (most recently) was sensibly created markdown files and good use of <figure> tags and other semantic markup. Further back were awful cases of <div>’s nested with inline styles that must have made sense to past-pat (but he was insane remember).

There are a few things that I would like to address at some point with Hugo though. I don’t have a good option for using a shortcode for responsive images using a srcset for instance (at least without having to roll-my-own shortcode which I could do). I also need an override to include a title attribute with an href around an image (this is something you can see when reading the alt text on xkcd comics).

I will look into creating my own shortcodes but it’s something I like to do sparingly to keep the build system from getting too fragile.

Filed under: website, hugo

Share this on: Twitter | Facebook