How I Stopped Worrying About My Static Site Generator (and Let Copilot Do the Work)

For years, I clung to a messy little static site generator I'd hacked together in Node.js. Every so often I'd think about rewriting it but the motivation never stuck. Then GitHub Copilot showed me I didn't need to rebuild anything at all.

August 2025

Screenshot of VSCode showing the generated HTML file based on a Markdown file and a template

I'm a web guy. Always have been. Over the years, I've built websites in just about every way imaginable. From hand-coding HTML to wrestling with CMSes, until I finally settled on static site generators.

And I like them. They cut through the noise. No databases to maintain, no bloated CMS grinding away on a server. I just need pure, clean HTML files that do exactly what I need. If I want dynamic features, I can add them client-side with a sprinkle of JavaScript, and the site still works perfectly with the SSG approach. It's the best of both worlds. Fast, secure, and completely under my control, without the cruft or the fuss. (Okay, that's more than two things, but "the best of three worlds" sounds weird).

A Spark of Static

For a while, I used Jekyll. Then I moved to 11ty. But they always felt like overkill for my little site. I don't need bleeding-edge features. I need something that works reliably. And most importantly, doesn't break backwards compatibility at a major update (I'm looking at you, 11ty).

My website has three templates. I hand-coded them with Bootstrap. They have gone though many iterations and they do what I need them to do. Two of them are even almost identical. All I need is to take a Markdown file, render it into one of those templates, drop in related images, set metadata from the title and lede, and maybe generate a sidebar from the <h2> headings. That's it. So I wrote my own static site generator in Node.js. I called it Zaphod, after no-ones favorite galactic president and inventor of the pan-galactic gargle blaster.

Zaphod wasn't pretty. Yep, I had full control over it, but the code was a mess. And frankly, I'm not a stellar developer. I started out okay in JavaScript, then switched jobs and found myself fumbling through PHP and Symfony, eventually getting better. Then came TypeScript and Nest.js. And the story repeated itself. A brief stint with C# and .NET left me loving the language but cursing the framework. (To this day, I have no clue why that company even hired me.)

Bad For Good

These days, I mostly work in Python and vanilla JavaScript. I'm still bad at Python, but I briefly planned to re-implement my Zaphod in it, just to improve in the language. Then reality hit: I didn't want to spend my weekends rewriting code I'd barely maintain anyway. (Spoiler: I spend my weekends on other inane things.)

That's when it struck me: I could just let GitHub Copilot generate the static pages.

Now, I write my articles in Markdown like always. I open the Copilot chat and add one of my existing HTML template files as an example, and ask it to format the article into that template.

Take the Markdown text in the document not-worry-ssg.md and render it as HTML in the file not-worry-ssg.html using the file ai-videos-2025.html as a template. Use the image img/worrying-copilot-tn.webp as the thumbnail. Add the title and the lead and the thumbnail image to the medta data in the head. Adapt the right navigation to use the h2 headings. No need to create a new project, just use the files I specified.

Boom! It spits out a finished static page in seconds. Sometimes it even gets the metadata right.

One curious thing about using AI for this is that it's not entirely consistent from run to run. Ask it to render the same Markdown into HTML on two different days and you might get two slightly different results. One time the footer is left empty, another time the "Home" button in the right navigation panel is missing, and occasionally some other random omission pops up. It's as if the AI has a short attention span and decides to skip a different little detail each time. None of these hiccups are catastrophic, but they do mean I still have to give the output a quick once-over before publishing.

It works so well I've completely abandoned the idea of rewriting my static site generator in Python. I'll probably keep sucking at Python! Because AI took my job: my job re-writing my rickety little static site generator 😃