I wrote down this draft of a brainstorming session in May 2023, and as I read it again in November 2023, I realize I was foretelling the future. I didn’t know it at the time, but this is the origin story of the latest round of tinkering to the blog site.
Here we go again.
Once again I find myself wanting to redo my entire web site from scratch, to write and deploy my own custom blog platform, because nothing else out there does quite what I want.
This time, I want to combine a traditional long-form blog and a microblogging platform together into one publishing platform. I want to use it to publish long blog posts every couple of weeks in the traditional way, but in addition, I also want to publish a stream of short-form content–let’s call them “schmweets”–all day every day, free from the social tyranny of a follower-based ecosystem.
I don’t know of any existing publishing platform that does both of those things together.
For clarity, let’s call this new blog platform Spirit Riot. Yes, those are two random words from a random word generator.
I’m growing weary of Twitter. Twitter is extremely useful for reading news, but not much else anymore. Everyone remaining on Twitter seems to have dialed up the snarkiness to levels that even I find obnoxious.
The popular alternative is Mastodon, but I still don’t like the Mastodon ecosystem very much. Besides the technical challenges that remain unaddressed, it feels squicky (which is a word that has an actual definition, believe it or not). Everyone is so obsessively friendly. The more friendly people act, the more squicky it feels to me. It’s the feeling of getting caught in a conversation with an overly-friendly neighbor. Or the feeling of seeing all your friends on Facebook leading fun and fulfilling and probably fake lives. Somewhere I saw the term “toxic positivity” and that feels like the right description for Mastodon, although I’m sure that term’s been co-opted as an ideological pejorative by now.
There’s always TikTok.
I’m currently interested in Next.js. It’s a fairly straightforward platform for React application development, so I’m thinking Spirit Riot could be achieved with a fairly simple Next.js project.
I’d like to host Spirit Riot with AWS Amplify, as it’s fairly straightforward to use, but I’m not sure if it’s feasible to host a Next.js project there, as it will likely be more expensive to run than a static site. Also, I don’t love AWS Amplify’s web metrics.
Before I can even start, though, there are multitudonous difficulties to overcome.
Obstacle 1 - Blog Content Storage
All of my published blog content currently exists in Markdown files on my local PC, because I like to write in a local text editor, because it’s the fastest and easiest way to write, and I don’t want to change that. The “source of truth” for all my writing is a directory on my laptop. I definitely don’t want the “source of truth” for my articles to be a database, which flies in the face of literally everything built on the Internet.
So right off the bat, I need to figure out a way to connect this new blog platform to a data source of Markdown files in a git repo, similar to how I’m generating the site now with Hugo.
My very first thought was to generate the blog in two phases: First, create a Hugo theme that generates a Next.js project from the Markdown files; second, build and deploy the Next.js site through AWS Amplify. I’ve abandoned that idea, because I don’t think you can do that with Hugo. Or at least, it would be prohibitively difficult and impossible to maintain.
My second thought was to create an API (with Next.js) that fetches content from a github repo, and call the API when rendering pages, but I don’t really want to do that. I don’t want to put my Markdown files into a public github repo; I’d rather keep them in a private repo only accessible to the tools that generate the site.
My third thought, which just occurred to me as I’m typing this, is to use Hugo to convert the Markdown content into a static site of something like JSON data files. Then I can easily fetch them from Spirit Riot and render them inside HTML pages. (JSON containing HTML would look ugly as hell, though.)
The benefit of that third option is I’ll be able to use Hugo to control the routing of the pages. The filenames of my Markdown files don’t necessarily match the URL path of the corresponding site link, a side effect of having to maintain backwards compatibility with old site links.
I can also use Hugo to expand any shortcodes in the source Markdown files, something I use for embedding images.
Obstacle 2 - Microblogging
The next major problem to solve is the microblogging. Blogging and so-called microblogging are two entirely different things, with entirely different infrastructure needs.
For example, I don’t want to use a text editor to write one-or-two sentence messages. That’s insane. I want to use a web interface for that, so immediately I will need to implement authentication and authorization in Spirit Riot, so I can log in and write my messages from anywhere. Identity management is a significant complication and risk right there.
I believe I can use AWS Cognito for that, though. I just don’t know how much it’ll cost. I only intend to maintain one user account, though (me). There are probably a million other out-of-the-box solutions for identity management out there. Selling these kinds of application building blocks is a booming cottage industry, far more so than the industry of writing applications themselves.
I’ll also need some way to store all those pithy messages I write, to display them on a page, so I’ll need to connect to some kind of database backend. Probably something cheap like AWS DynamoDB, but anything will work. I’ll probably create an API to interface with the backend, so I can swap it out for anything I want.
Anyway, that was my initial brainstorming about this latest round of blog experiments. I’d forgotten I wrote it. But it’s relevant now, since I’ve been tinkering with a Next.js blog application for the last couple weeks. More later. Maybe. If I feel like it.