The Static Site Churns!

I often refer to my scuffed static site generator but what is it? It’s a hodgepodge of scripts honed over years, or pilfered from GitHub last week, that glue together my website. As of this weekend it now includes Hono too. Yeah, I refactored again 😔 The self-inflicted JavaScript churn continues! […]


This content originally appeared on dbushell.com (blog) and was authored by dbushell.com (blog)

I often refer to my scuffed static site generator but what is it?

It’s a hodgepodge of scripts honed over years, or pilfered from GitHub last week, that glue together my website. As of this weekend it now includes Hono too.

Yeah, I refactored again 😔 The self-inflicted JavaScript churn continues! Previously I achieved super fast builds using my own experimental just-in-time Svelte templates and URL pattern router. I then went down the HTML parsing and markdown rendering rabbit hole. Eventually I coded my own libraries for both.

I could just use 11ty or Astro but where’s the fun in that?

⚠️ Disclaimer: This is my personal website. I do not write such ludicrous and convoluted code elsewhere (mostwhere). Much of my day work is good ol’ LAMP stack.

From markdown to markup

My website starts life as a humble collection of markdown files with front matter. These get parsed into JSON with the main body converted to HTML. That process takes around a second. Most of that time is syntax highlighting. I call the output the “manifest”.

Hono matches requests against patterns like my blog:

const pattern = "/:year{\\d+}/:month{\\d+}/:day{\\d+}/:slug/";

That particular structure is a relic of WordPress.

Hono consults the manifest for content. It calls my Hypermore template engine to render a HTML document. This runs as a live web server “in development” aka Dev Mode™. For that I still use Deno but with Hono my runtime dependency is reducing.

To generate a static build I iterate over the manifest and fetch each page writing it back to disk. The build process takes around four seconds. Disk I/O is the bottleneck. There is a Hono SSG helper but I prefer full control.

I have another script to generate open graph images. Another script to generate a static search index. That last link is already outdated. I’ve since written my own Zig and WebAssembly search index (I’m still drafting the blog post).

Deployment

After moving to Bunny CDN I no longer use a GitHub Action for deployment. I hacked together yet another script to “rawdog” their API, so to speak, that compares SHA-256 checksums and uploads or deletes files as necessary to sync my local build. This negates my self-hosted action idea to the delight of my weekends.

Is it ever done?

My static site generator has seen countless iterations since 2014. Not to mention the redesigns that give me an excuse. Wait, what year is it now? Good lord, that’s over a decade!

I just like fooling around with JavaScript and recently, Zig. Every new addition improves my website and teaches me a new trick (for better, or worse). Switching to Hono forced me to clean up my codebase. I’m technical debt free! For now, Zine is giving me ideas…

Code’s on GitHub if you can make sense of it. It won’t run for you. The data submodule is private to protect against LLMs. Images are in private large file storage too.


This content originally appeared on dbushell.com (blog) and was authored by dbushell.com (blog)


Print Share Comment Cite Upload Translate Updates
APA

dbushell.com (blog) | Sciencx (2025-05-11T10:00:00+00:00) The Static Site Churns!. Retrieved from https://www.scien.cx/2025/05/11/the-static-site-churns/

MLA
" » The Static Site Churns!." dbushell.com (blog) | Sciencx - Sunday May 11, 2025, https://www.scien.cx/2025/05/11/the-static-site-churns/
HARVARD
dbushell.com (blog) | Sciencx Sunday May 11, 2025 » The Static Site Churns!., viewed ,<https://www.scien.cx/2025/05/11/the-static-site-churns/>
VANCOUVER
dbushell.com (blog) | Sciencx - » The Static Site Churns!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/05/11/the-static-site-churns/
CHICAGO
" » The Static Site Churns!." dbushell.com (blog) | Sciencx - Accessed . https://www.scien.cx/2025/05/11/the-static-site-churns/
IEEE
" » The Static Site Churns!." dbushell.com (blog) | Sciencx [Online]. Available: https://www.scien.cx/2025/05/11/the-static-site-churns/. [Accessed: ]
rf:citation
» The Static Site Churns! | dbushell.com (blog) | Sciencx | https://www.scien.cx/2025/05/11/the-static-site-churns/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.