Switching Site Generators

Posted on June 4, 2021
Tags: blogging, lisp, Common Lisp

Tim Lavoie

Changes are afoot, and along with them, some borkage. Let’s see where this is going…

I am a fan of static site generators, as opposed to full-on blogging platforms such as WordPress. I appreciate being able to create and update posts easily, without having to have additional infrastructure to maintain. Static site generators are fantastic for this, where some code and simple, portable files at home, can be translated into templated, static HTML and other supporting files on a web server.

The solution is simple enough that many people write their own, and I thought about that. There are already so many to choose from though, that it makes more sense to me to find something I’m comfortable enough in its environment to hack around as needed, without starting from scratch.

I’ve been using Hakyll for a fair while, and it is indeed quite powerful. The idea there is that you have a domain-specific language (DSL) for writing your site in, and it generates it from there. So, your config file is actually executable code, not just a lookup table of values. Hakyll is written in Haskell, a language in which I’ve messed around for some time. It too is powerful, but I’ve come to really appreciate the experience to be found in a nice Common Lisp environment.

Primarily, the development experience with lisp is very, very interactive and exploratory, which I love. Because you are in the environment you’re working on, you have this wonderful access to the inner workings. This helps with understanding the piece you care about, making alterations on the fly, and see how it all changes to suit. A modern IDE is what would come to mind for many, but really, it’s more like an IDE is (typically) a pale simulation of what it’s like to be immersed in the environment.

Long story short, I’ve (re-) started using a package called Coleslaw instead of Hakyll. It has some nice features to be sure, though I’m not sure it’s actually more powerful or polished. I think there are likely some warts, but I can jump around quite easily to find where the warts come from, so I think it’ll be a more fun experience for me.

That said, it means things will, or have, broken. Mostly just some links to posts, where there are different naming systems and the like. After all, any software is a product of the minds and preferences of their creators, and there is no spec here that says one has to make the same choices as another. I don’t imagine enough traffic comes here for it to actually matter anyway, and this is my playground. I will choose to mold the putty to suit my biases, this way and that, and that’s just fine. That’s what open source software is really good for after all, and perhaps I can help improve this bit that I’m using for free.

Note: I don’t have comments figured out, but this post can be discussed via Twitter, here.