Build A Website Builder For Fun And Profit
I always promised myself I would never write a “This is how my site works” blog because goodness knows there’s enough of those already1. Nevertheless, the static site generator that builds this site is my main project at the moment and I have thoughts about it.
Even though I will not be telling you how to make one, I recommend that you do try, if you are technically inclined. It is easy to start, but the depth of detail in it is instructive.
I decided to make things myself after looking at some of the other options like Hugo, Jekyll, and even Org Mode. But they all had tons of configuration involved, and lots of features that I felt like I didn’t need for my use case. However, one of the biggest lessons you learn in going your own way is why the other tools are the way they are. I can live with hard coding this or that bit of data when I know that I’m the only one who’s ever going to use it, but it’s obvious how one would want to parameterize it if it was intended for others. And all those features that I thought I didn’t need? As I work I find I want more than I realized. And so I feel a pull to add them, to make everything more generic and reusable, and abstracted, and only resist in order to keep the scope of this project firmly contained.
So I recommend trying it yourself. Because the moral of the story is that coding is a skill learned by doing. There isn’t any explanation of the architecture of a static site generator I can think of that would have made its needs and motivations as clear to me as making a bad one has.
-
The code is here if you do want to read it: https://github.com/carewdavid/mocha ↩︎