on hugo

thoughts

Where have I been with blogging to this point?

  • In 2013 I gave blogging a start and built one with my own homegrown tool. I’m guessing at the time none of the python static site generators really appealed to me for one reason or another. That and it’s an obvious programmer cliche to build it yourself, especially if its been already done numerous times elsewhere.

  • The problem with writing your own blog engine is simply software maintenance. My original blog engine was written in python 2, which is now officially defunc. I doubt I could port it to python 3 without running into poor design decisions that I would then be compelled to fix. I need to write stuff down, not get sucked into a programming rabbit hole.

  • Recently, for capturing notes of this type, I decided I needed a new blog. This time I decided I would try Pelican. I set it up picked a theme and started to mess around. Pelican is fine, but I wasn’t happy with the theme I based it on, so in general the experience was tainted, which left me open to making a change.

So why Hugo?

  • It’s nicely packaged. What can I say, the candy store effect is alive an well and I’m a sucker for new and shiny stuff.

  • Generally it looks and feels like it has more of an audience, with greater support and longevity.

  • It’s a single binary file - none of this python packaging bs. There is a psychological difference between a program that is a collection of files inside various folder being run by an external interpreter than a single file “application”. If I’m going to write stuff, then I want to feel a little less close to the program.

  • It’s fast. I really didn’t understand what this would mean to me, but now that I have used it… wow. Writing in vim on the left side of the screen and the browser on my right pointing to the server… save my file and viola the change appears almost instantaneously in the browser.

  • It is written in go. I didn’t have an particular interest in go until recently, but as a compiled systems type language there was some appeal. Obviously this is the reason why hugo is very fast, and why some of the above points exist.

Additional thoughts on Hugo:

  • The working directory layout is pretty much the same as everything I’ve used, test and played with previously. In general I don’t like this. I understand why it’s like this, but I don’t like it:

    • content, themes, output, etc. are all in the same directory by default. This can be changed to some degree, but its a CLI and that generally how this rolls - but it smells off to me.

    • layout and assets and static folders are at the same level and in different folders. Again, this likely can be changed, but it feels odd that it’s separate like this.

    • I feel there should be one directory with two folders:

      • content
      • theme
    • output/public should live somewhere else in a temp dir.

    • I would have to say the whole file layout makes hugo feel a lot like python - just an extra specialized blogging language. I was attracted to hugo cuz it’s a single binary file and now I’m complaining it feels like a python variant?

  • I like the templating language. It is very similar to Jinja - both in the markup style and the template components - so it’s been natural to work with.

  • It has builtin piplining for doing minification, and using SCSS/SASS. Though I discovered the hardway that to use SASS you need to compile hugo yourself with the expanded flag. Why the hell this wasn’t pointed out at the top of the documentation for using the SASS pipline is beyond me… or why hugo’s error messages don’t explicitly warn a required component is missing.

  • Configuration can be TOML.