SaltyTron

New Blog Generator October 10, 2024 While writing and publishing the last few blog posts, there always seemed to be something wrong with the platform that I had to debug. A lot of it had to do with how my “simplesitegen” project was being installed and invoked in my hacked-together, automated blog deployment pipeline, but whatever the issue was, it was something that needed to be fixed in order for me to continue blogging. When faced once again with issues running custom-built blog generator, I decided to go back and investigate some of the off-the-shelf options I had forgone earlier in my decision to build my own static site generator. Hugo Works Well, if You Spend the Time to Understand It Soon, I was working through the Hugo documentation to see if I could migrate my blog over. It was very helpful to already have content and templates to test with. Most of my time was spent figuring out what names Hugo expects you to give your templates, and how content information is exposed to the template. After a few hours, I was in business with a basic blog site that was more-or-less at parity with my existing blog. Some initial reflections on the process: Cons: Hugo has a learning curve. It requires learning to think in terms of the tool, which isn’t always intuitive. Once you understand it, though, it’s generally fine. Hugo requires a couple of dependencies that must be installed separately, including Go and Dart Sass. Not a huge inconvenience, but not as convenient as an “npm install”, if NodeJS is already installed on the system. Pros: Hugo comes with some nice features, including: A development server that supports auto-reload on changes, which lets you preview your changes in real-time An rss feed generator for collections Built-in Google Analytics support Since it has a broad user base and an active development community, it is mostly free of bugs and “just works” The “Build it Yourself” Mentality - Good or Bad? Now that I’ve concluded that it’s lower maintenance to use an already-available tool to build my blog, do I wish I started off with Hugo? Not exactly. Decisions made at any point in time should be based on the conditions of that time. Given the difficulty I had making sense of how Hugo renders templates, it would have been a bigger challenge for me to learn that while I was also writing the HTML and CSS for my brand-new site. I think simplesitegen was also a useful exercise in learning the concepts of static site generation. And who knows, maybe I’ll eventually turn it into a more usable off-the-shelf tool. I do think the way that it handles rendering of templates is much more intuitive, even if it does require some coding.

This is a companion discussion topic for the original entry at https://saltytron.com/posts/2024-10-05-new-blog-generator/