Why make your own static site generator?

1st August, 2013

Overview

Static site generators are ten-a-penny these days, I'm making yet another. May be helpful to figure out why I want to re-tread such well trodden ground, and why there are already so many.

TL;DR "there's some magic in a solution that's direct, reliable, easy to understand, and one that fits my personal vision of how it should work".

Modest, achievable and fun

Am haunted by the ghosts of countless side-projects (and proto-side-projects), which drowned in the potent combination of ambition, hubris and perfectionism.

Working on this static site generator is re-awakening long-forgotten joys of programming for the fun of it: making stupid games in QBASIC, doing 'view source' on Geocities pages, joining the World Wide Web of shared ideas.

No worries about what anyone else thinks about the code, just the unadultered pleasure of wanting to make something happen, and writing code that does it!

A dramatic contrast to my other side-projects and professional work. Personal, relaxing, idiosyncratic, whimsical fun - hacking in the purest sense.

Still opportunities for craft-improving - decisions on yak-shaving, playing with trade-offs, exploring programming concepts... experimenting with ideas for the sake of it.

Plain text, personal markup and control

The virtues of plain text are well established: no WYSIWYG guff getting in the way, can read/write anywhere forever, and so forth. Editing in a box in a website, having my documents and posts under someone else's control, at the mercy of a platform which could shut down or die while I look the other way, sucks.

All my notes and thoughts are already in plain text. With my own static site generator, can create and use my own perfect markup! Which is just a formalization of the way I like to format plain text - none of the stupid quirks of markdown (etc.). Get to invent my own stupid quirks!

Plus is fun to invent a markup & parser. Parsers are interesting. Good first step toward making a toy programming language.

Total control over markup, and tight integration with the site generator makes for interesting possibilities! If I decide I need markup to render ASCII art as a canvas element, I just need to stick some music on and get cracking.

Tight integration

All diligent programmers know about Modularity, Re-usability, Seperation of Concerns, and similar such hard-won knowledge. All of which is great!

But because this project is about scratching my own itches, making things happen, and generally having a laugh - I get to ignore all the wisdom of the last 50 years of programming.

OK, not really, but is nice to take a step back from all that and focus on just doing cool stuff. And as a side-effect of tight integration and total control, I get to try whatever crazy refactoring ideas I feel like!

Nobody likes other people's code

I'm not too fond of my own code (especially my old code, yeugh!). But at least it isn't other people's code.

Modern web dev entails an awful lot of plumbing, wrestling with frameworks & plugins, and server nannying. All of which allows you to accomplish many cool, useful things with remarkably little effort. But a certain intimacy is lost. With this project, all I need is Python's standard library, no requirements, no dependencies. The simple pleasure of just me and an interpreter.