Spinning up Hugo

Decided it was time to consider self-hosting again but I didn’t want to have to deal with all the stress of hosting something dynamic so instead I’ve opted to look into Hugo, a static site generator written in Golang. Coming from a traditional MVC past it takes some getting used to but I can definitely see the apeal—especially from a security POV.

Templating/theming especially is very foreign to me, but then again, I always ended up going with black on white, Times New Roman, blue links (purple if visited) and little more than that, so I figure I can live with pretty much anything and leave all the cool theming and design to all the cool people that are good at that stuff.

But back to Hugo. I’ve been playing around with it for a few weeks now. Mainly because I wanted to migrate away from Medium. Not for any particular reason other than control. It allows me to deploy my stuff to a pretty barebones setup with a simple webserver that will never need to process anything but GET requests. That’s about as secure as a website can get, right? Pure HTML/CSS (not even any Javascript in my case) being served up, no processing on the backend, not injectable DB interactions, no XSS. It really all comes down to encryption in order to prevent man-in-the-middle attacks and the server stack itself. In my opinion that’s a huge step in the right direction.

One beef that I do have with Hugo though: The documentation is pretty confusing. Am I supposed to use baseof.html with a bunch of blocks to build my pages, or should I go with partials instead—or a mix of both? The docs and theme examples seem to indicate “both, or whatever you like … maybe”. I’m not currently at a level where I can really tell how unmaintainable my site will become by doing one or the other (or both) so I guess I’ll just have to go by trial and error. I kinda wish that Hugo would be as opinionated as the language it’s built with.