Blogging on JS frameworks

The JavaScript Framework Cinematic Universe has never been stronger; it's gotta lotta steam and it's only getting steamier, and while an angry god still holds us sinners over the fires of dependency hell, at least the JS framework gestalt is in the right place: performance on less powerful machines, accessibility tools, server-side rendering.

However. While Next.js, Remix, and friends continue to thrive on midsize, dynamic websites (think Notion, think Twitch, think Hulu), they also continue to be the gold standard for e.g. blogs (as Zach points out, the three biggest JS-based frameworks all feature blogs on their tutorials). And for a blog, it feels like web developers—and more importantly, their users!—are being underserved.

Note here that I'm only kind of talking about static site generators. There are tons of frameworks that turn source files into plain HTML, and a lot of them (like Zach's Eleventy, or Jekyll, or Hugo) are very good!

These frameworks are pretty good at turning Markdown files into web pages (even if, as I say, you're subscribing to years of complicated dependency update headaches). And they're even getting good at playing nice with the browser: the correct HTTP status codes, route change announcements for accessibility tools, that sorta thing. And that would be a big deal—if that hadn't been table stakes for boring web technologies for almost 20 years now. If you're just building a blog, you can get up & running with WordPress in minutes—and I promise that your users won't notice the difference between a relatively stock WP installation (+ optional Cloudflare) and your edge-delivered incremental-static-generated Next site. And deployments will be a lot quicker, too.

Don't get me wrong: like Rich Harris, I think that leveraging JavaScript allows you to create incredible experiences in the browser—just compare Notion, which uses Next.js, to GitHub, which continues to serve a JS-lite web experience. Frameworks like this underpin so much of the power of the web and they'll continue to do so well into the future.

Look who's talking here: this site is built with Next.js—but it shouldn't be. I was riding the hype train when I built it, but it doesn't benefit from being on Next and it arguably degrades the experience. You don't need a hypercar to take the bins to the end of the drive, and you don't need a JavaScript framework to power your blog.

Web Java Code


Cache busting with GitHub Actions

If you want to bust your asset cache whenever a GitHub Action deploys your site, it's actually remarkably easy!


Fun with hsl()

Hue, saturation, and lightness provides a fun approach to colour that allows for some neat programmatic tricks.