A summary of the state of the blog and the lost Next.js blog I never finished.

A 2024 Static Site Status Report

1,535 words.

A 2024 Static Site Status Report

Aywren had a great idea for a post topic that I felt inspired to steal for Blaugust.

I also run a static blog, built with Hugo and deployed to AWS (Amazon Web Services). It’s been running since 2021.

I write in Markdown instead of HTML, though. I personally shudder at the thought of writing in HTML–I had quite enough of that in the 90s. I prefer to keep post content 100% separated from formatting and layout (it’s a programmer thing). I write in a very old-school non-WYSIWIG way, in a plain text editor.

Static sites are a trendy new thing, but less new than a few years ago. Once, I was the only static site I knew of. Now I know of a half dozen, and it’s a fairly popular style among the developer community. It’s tangentially related to the newish IndieWeb movement to return to the more federated days when site owners hand-crafted their own diverse and interesting web sites (in the 90s and early 2000s). (As opposed to the current glut of monolithic corporate content services like WordPress or Medium.)

I haven’t said much about the under-the-hood developments of the blog for a while. The last post I published in the Quest for the One Blog saga was near the end of 2023, when I had a crazy idea to build a whole new blog in Next.js.

The Lost Next.js Blog

What happened was this: During November and December, I did build a whole new custom-built blog platform in Next.js, but I never actually followed through and switched over to it. Then, 2024 happened, and I basically forgot the whole thing. There’s been a parallel blog site deployed this whole time at a different link. (Looking back at my microblog archive, I see that the launch of Baldur’s Gate 3 also had something to do with losing interest in new blog work.)

The development of the new site was so rapid I didn’t have time to write any posts about what I was doing. However, there are some details here and there sprinkled throughout the microblog archive. I’ve tagged those entries so they should appear in the Quest for the One Blog list.

Luckily I spent time recording daily “devlogs” to keep track of what I was thinking and doing. And thank god I did, because I’ve forgotten everything I did and why I did it. I’d start down a path, find it didn’t work, delete everything, start down a new path, and repeat several times. I had some ideas to publish those, but I never followed through with that.

Let’s see if I can remember the basics of what I was doing before I abandoned it.

(I actually wrote a whole post on this back in December, but never published it. I call this system “Spirit Riot,” because those are two random words that sound funny together.)

The idea was to build a Next.js site with some lightweight dynamic server features (the things you can’t do with a static site), but where the blog content itself was still statically generated at build time. That’s something the Next.js platform happens to be good at. (I learned about the benefits of Next.js at work, although, to be honest, I think it’s more beneficial to my blog than it is to what we did at work.)

There are numerous examples of building static blog sites from Next.js on the Interwebs, so I just started with those examples. Unfortunately, most of the examples are for starting a brand new blog, and largely ignored the pitfalls of a blog with 10+ years of existing content, so I had to throw out most of what I read.

Of course, since it’s Next.js, which is a Node.js platform, everything on the Interwebs is wrong and you have to work through a million problems on your own. I won’t go into a dissertation here on the cons of doing any Javascript-related development, which is by far the most rapidly-evolving, unstable, poorly documented, becomes-obsolete-a-year-later, dependency-hell-driven platform to develop in. And somehow still one of the most popular. Kids today, amirite?

I came up with an apt metaphor for developing in Node.js:

“Developing an application using anything that touches Node.js is like trying to draw a picture using a swarm of bees.” -Me, 2023.

Another one of my favorite microblogs from that time period:

“The basic process of getting anything to work in a javascript environment goes something like this: Add fifty billion dependencies and pray that one of them actually helps with the problem you’re trying to solve, knowing for sure that 99% of them will probably not end up being used at all but you’ll never be able to get rid of them.” -Me, 2023.

The Current Blog

So my blog is currently built with Hugo, a static site generator that takes simple Markdown content files and turns them into complex HTML files using Golang-based template files. Hugo is actually very good (and fast) at converting Markdown into HTML, and I didn’t want to have to replace all of that Markdown conversion functionality with any of the Node.js Markdown rendering libraries out there.

Especially because I use a lot of Hugo shortcodes in my content, which are little embedded “macros” of sorts that expand into things like styling hints or prewritten text blocks or things like that.

(Side note: If I were starting a new static site, I would probably go with Eleventy instead of Hugo. Hugo has almost unlimited “power user” capabilities, but it’s a bear to get started in. I’m fortunate to already have some knowledge of Golang templating, which helps a lot. Eleventy, however, is much easier to work with.)

The New Idea

So, my idea for the Next.js blog was to use Hugo to generate not HTML but structured JSON page data (which is mainly encoded HTML content along with metadata), and then render that JSON data within the framework of a Next.js blog engine. So the build process would be two steps: A Hugo build to generate JSON data files and then a Next.js site build from the JSON data.

Believe it or not, it actually worked. I was able to get the benefits of Hugo Markdown conversions and the benefits of static site generation and some lightweight server capabilities. And I deployed it all to AWS with some CloudFormation templates so I could basically just press a button and spin up a complete blog infrastructure at will (more or less).

The Next.js blog has some new features like json feeds, too. (Of course, that particular thing doesn’t appear to work. I think because it only includes recent items and I haven’t refreshed the content since December. And when I went to trigger a content update, every build failed. Sigh.)

If you’re not aware, RSS feeds are old technology now. JSON feeds are the new thing. (It’s exactly the same as an RSS feed, except it’s JSON instead of XML. JSON is a much easier data transport format than XML for newer application development platforms to handle natively, particularly in web-centric platforms like Node.js.)

Helpful Microservices

Then I hit on the idea of writing some AWS Lambda functions (microservices) to handle things like notifications, pingbacks, and webmentions. I originally wrote them in Node.js but I grew to hate Node.js (especially in the area of unit testing and dependency management) and started to change them to Golang.

The idea was to write those services as Lambda functions so they could theorically be used for any blog that had an RSS feed, and they wouldn’t be tied to my particular Next.js blog (in fact, I need not even bother switching to the Next.js blog, because the microservices would work just as well with the current Hugo static blog).

So that was the last thing I did for the blog, but like I said, I lost interest and haven’t touched it in 2024 yet. Time just kind of gets away from you, ya know? It’s been left in a perpetual “almost finished” state.

What’s Next

I should probably start by picking up all that new code and continuing it, perhaps fixing it so I can actually run a build of the new site again. I had some concern that it might cost too much to host a Next.js project in AWS, but looking over the Cost Explorer this year it’s not that much extra. But then the parallel site hasn’t been getting any traffic this year, either.

So that’s the state of the blog. Essentially unchanged, but a lot of ideas have been thrown at the wall behind the scenes in the last nine months.

Like Aywren, I, too, have no complaints about my homebrew blog project. I don’t miss WordPress in the slightest. As a software developer, I personally can’t wait for the day when WordPress is wiped off the face of the Internet, along with its infestation of obsolete LAMP stacks. It’s like having an Internet built on Microsoft Access. Yuck.

But that’s just me. I like to keep doing new things. I never want to be one of those old curmudgeons pining for the old days.

Related

This is a homegrown DIY comment system I'm working on. It technically works but it hasn't been through extensive testing yet. Good luck. Go here to enter a comment on this post without Javascript.