Published on 2020-09-11
Before putting this website up, I decided to look through my old GitHub repositories. I found a static site generator that I wrote in 2015, which was a really fun project. It just turned markdown into pages and blog posts. I had tried using Jekyll and Hexo, but I wanted to build something similar.
Unfortunately, the generator some edge cases that I couldn't figure out, so I never published it.
Looking back, it was refreshingly concise. It reminds me that rolling your own software is the most efficient way of learning how things work.
The architecture looked something like this:
A Node server that:
The only dependencies were Koa, a markdown parser (I used marked
), EJS (to organize code for static pages), and highlight.js (to server-side render code snippets).
Though I'd swap out some tools, this design holds up. It works in modern browsers, Node versions, and adds little bloat. It doesn't do too much.
I love software with narrow scope. The author can inspire readers to easily understand it, remix it, and build something new.