koine devlog part 1

Briefly:

The word of the day is REALISM. (That is not the kanji of the day. You'll learn the kanji of the day shortly.)

Yesterday, I decided I wanted to try changing how my website is rendered. (Yes, we have already reached the blogging-about-how-we-blog part of the program. Did you think they would all be lengthy philosophical tracts?) Let me tell you what I have wrought.

State of the art

Currently, I use a personal branch of Drew DeVault's kineto HTTP to Gemini proxy in front of, ah, Drew DeVault's gmnisrv to host this website. Why do I do this? I like Gemtext and at one time appreciated the constraints of the setup. Also, gmnisrv makes it really easy to configure CGI, which I, uh, don't actually use on this website (I do on my capsule...) but it's nice to have I guess?

Drew DeVault: "kineto"Drew DeVault: "gmnisrv"Gemini Protocol

Anyway I've decided this actually isn't complicated enough and that I should make everything more complicated by introducing a build step, as the first of many steps in my plan to make my entire self-hosting setup more complicated for unclear reasons. (I have Kubernetes brainworms.) In order to accomplish this with as little disruption as possible to my massive website of half a dozen pages of Gemtext, I figured I should build a tool that could produce roughly the same HTML output as kineto does, but at build time rather than runtime.

I could've modified kineto to do this--I understand the Go code decently enough at this point, having made a few tweaks like adding progressive enhancements for audio/video/image links (cf. "travelog"), but I don't really write Go very well, and anyway this sounded like a great opportunity to shoehorn Gleam into things. Gleam is of course the new hotness and one of my current mild obsessions as far as programming languages go, so I didn't take much to convince me.

journcy.net: "travelog"Gleam programming language

koine

So like I said I decided to do this yesterday. You'll note this post is coming out today. (Uh, sort of.) Yesterday's effort crashed and burned in various boring ways, but I had a little more time to think today (and a fully functional text editor) and was able to put together a version 0.0.1 that implements all the kineto HTML generation features with only a moderately scuffed command line interface.

Unfortunately I cannot triumphantly assert that the blog is now running on the new software, because I haven't migrated it yet; it's late enough as it is, and I'm not convinced the nginx config will be trivial. But if you're interested, you can check out the source code on Tangled.

journcy: "koine"

I'm actually quite pleased with the rewrite so far--I've been on a slow but steady (mental) crusade against templating languages (likely more on this later), and rewriting the kineto template using Lustre's HTML element manipulation facilities was very satisfying. (The Gleam blog post drinking game is that you finish your drink every time someone compliments Lustre, so, bottoms up.)

Hayleigh Thompson et. al: "lustre/element"

I thought I'd try the older "lustre_ssg" project, but between code so old it uses fully removed standard library functions and behavior not quite matching what I wanted I ended up implementing the output routine myself. (It was like 20 lines of code tops depending how you count it, so, definitely correct.) It seems like Hayleigh doesn't consider the SSG super high priority, which makes sense to me, as it's fairly minimalist and kind of a niche use of Lustre to begin with.

Hayleigh Thompson: "lustre_ssg"

At any rate, I'm excited to have a foundation from which to build out a few more features for the site in a programming language I'm actually fluent in, even if I'm rolling my eyes at myself for finally giving in to the programmer brain and building my own static site generator. Next up on the list: an RSS feed generator, because no blog can rightly be without an RSS feed, and OpenGraph support, because I long to have pretty image cards on my Bluesky tweets.

The kanji of the day is 秋

The left part (the *hen*) is dubbed "bundled rice sheaf" by Conning in KKLC, and the right part (the *tsukuri*) is the kanji/grapheme for fire, so the mnemonic he gives is "sheafs of rice standing drying as nearby the fields are burned to clear them." I still can't help but see 木 instead, and think of "the leaves bright red like fire." I give 秋 a 9/10, for being one stroke off of a top notch mnemonic.

Discuss this post on Bluesky