Static Site Generators are Well Suited to Hobbyist Programming

Posted on October 24, 2021 by Richard Goulter
Tags:

Static site generators are definitely a “for developers” tool. Or that’s the impression I get from seeing that staticsitegenerators.net has hundreds of projects listed, ranging from a few GitHub stars all the way up to tens of thousands of GitHub stars.

I’m reminded of a comment I saw on Hacker News talking about Factorio. Factorio is a game with gameplay which feels very similar to programming. This comment I saw explained, though, that the game’s similarity to programming leads to two sets of reactions to it from programmers: 1. the game is similar to what I put my creative energy into, but without the constraints of needing to be reliable or being told what to do: it’s very fun; 2. the game is similar to what I put my creative energy into, but without any tangible benefit from putting in that work: why would anyone want to ‘play’ this?

My blog is generated with a static site generator, customised using the Haskell programming language.

I don’t think I’d be able to argue that it’s a practical choice if the goal is to serve a blog. – But it’s as good an excuse as any to write something with Haskell.

This weekend I spent some time brushing the project up a bit.

It’s fun.

I’m not familiar enough with Haskell to know all the right idioms. I think the code for the site very much smells in places with indications that I don’t know what I’m doing.

Still, I feel I rearranged the code into a nicer, more consistent shape than it was in before.

I also tinkered around and updated the Nix files. I think Nix is nice for side projects. It’s often tedious to try and install some old compiler on a system. – With Nix, it’s easier to install from an older version of the package repository.
So when the project needed to build using an older GHC version (and NixOS didn’t like running the GHC version which stack downloaded, because it didn’t have the shared libraries available), Nix can get an older GHC by using the package definition from an older version of the package repository.
– Albeit, Nix has quite a steep learning curve. I wasn’t able to figure out how to do that nicely last time I’d tried to write the Nix files for the project.


Newer post Older post