DIY static website generation
My personal website has always been statically generated from some Markdown files. I used various static website generators and, while I think they are all pretty good, I ended up multiple time in the following process:
- choose a generator and set it up
- pick a theme and, after having spent a lot of time choosing it, learn how to tweak the few little things I don’t like
- write something and publish it
- wait for a somewhat long time
- learn that something needs to be updated
- spend more time updating the generator than writing content
- updating themes is usually pretty annoying
- decide to start from scratch
I saw some people on Twitter saying that they rolled their own solution and I wanted to give it a try too, in an attempt to break the cycle.
Do It Yourself
I gave the DIY solutions a try and I managed to get something basic, but easily extendible and that does everything I need fairly quickly with less than a hundred lines of code.
This solution has a few different advantages:
- I understand very well how it works
- it does only what I need
- I can easily extend it. The ability to write code gives me a lot of flexibility
This puts me in the position to have a generator tailored for my needs and that changes only when I decide I need a particular feature. The rest of the time is just out of my way and I can focus on writing my posts.
Risks
This approach has some trade offs:
- my tool isn’t as mature and well tested as more established solutions. I am willing to bet on the simplicity of my tool
- I could write a solution in so few lines of code by leveraging some dependencies. These will eventually need to get updated and I’ll see how easy that this. Fingers crossed!
Conclusion
While off-the-shelf static website generators are pretty good, I had some issues with them and decided to roll my own. This choice has some trade offs, but I think that simplicity and ease of customisation are worth taking this bet given that my use case is as basic as it could be.