Every now and then you want to start over. This blog was long overdue for it. Feels good to tear it down and rebuild.
The old setup was WordPress on NearlyFreeSpeech.net. NFSN deserves credit – their pay-as-you-go model is honest and the value is real. But WordPress started feeling like a constraint. I spend my days building custom solutions. Using a one-size-fits-all CMS for my own site felt wrong.
So I built a blog engine.
The stack
Node.js. libgit2. Markdown. That’s the core.
The idea that got me excited: what if the blog was powered by git at the backend? Not git as a deployment tool – git as the content store. Articles are markdown files in a repository. Publishing is git push. Every edit, every revision, every draft is versioned. The content management system is git.
libgit2 makes this possible without shelling out to the git binary. It’s a C library with Node bindings – read repositories, walk commits, extract file contents programmatically. The blog reads articles directly from the repo, parses the markdown, and serves rendered HTML.
No WYSIWYG editor, no database, no admin panel. Open a file, write, commit, push. The workflow is the same as writing code. For someone who lives in a terminal, this is how content management should work.
The npm ecosystem fills in the rest. Markdown parsing, syntax highlighting, templating, static file serving – a package for each, nothing custom where a well-tested module exists.
How it works
A request comes in. The engine looks up the route, finds the corresponding markdown file in the git repository via libgit2, renders it, returns HTML. Templates handle layout. Static assets are served directly.
No database. No cache layer. No build step. The source of truth is the git repository, and the engine reads from it on every request. This is inefficient and I don’t care – at the traffic a personal blog gets, it’s fast enough.
New post workflow:
- Write a markdown file
git add,git commitgit pushto the server- Live
There’s something satisfying about a publishing workflow that fits in four lines.
Clean slate
This post is being served by the engine it describes. First article on the rebuilt blog, about rebuilding the blog. There’s a recursive satisfaction in that – like a build system that compiles itself for the first time.
The old WordPress site had years of content that I’m not migrating. If something was worth saying, I’ll say it again. If it wasn’t, it doesn’t need to exist here.
A few weekends of building. Node.js, libgit2, markdown, and the satisfaction of having built it from scratch.