💾 Archived View for warmedal.se › ~bjorn › posts › an-ode-to-gemtext.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

➡️ Next capture (2022-05-25)

-=-=-=-=-=-=-

An Ode to Gemtext

Although a lot of things about the Gemini protocol are still in preliminary stages, the markup language gemtext (mime type: text/gemini) is pretty much set in stone. For me the thing that drew me into Gemini was the simplicity of the protocol. This was something I could grasp; I can actually write a Gemini client myself. HTTP, CSS, and JS makes it impossible for me to create a web browser on my own: the two leading web browsers out there have teams of hundreds or even thousands of engineers working on them. Once Firefox eventually bites the grass (as I fully expect will happen) there will be no competition on the web anymore. Whatever Google wants will become part of the standard, and nobody else can hope to keep up.

But this post isn't about that. This post is a love letter to the gemtext markup language. It's a very strict and limited line-based markup language. Section 5 of the specification describes it neatly:

HTTPS link, because I assume those who read this from geminispace already know.

In essence this is what you can do with gemtext:

That's it. No italics or emphasis, no tables, and specifically no styling or inline images.

The thing about this is that a simple gemini client doesn't need to parse gemtext before presenting it. If you try to read an HTML document as raw text it easily becomes an exercise in finding the actual text content among all the tags. The web version of this site is very sparse, but the HTML tags still take up a significant portion of the space.

I write my posts in gemtext, and convert to HTML for the web. The lack of features forces me to think more about how I structure my text, and links are presented as clear references rather than being sprinkled within text blocks.

When I want to have images I link to them. I considered writing some heuristics in my gmi2html conversion tool to <img> tags instead of links whenever I linked to a jpg, jpeg, gif, or png file. But I decided against it. Partly because any heuristic like that would have to be maintained; what if I link to a webp or tiff, or any other format I initially hadn't considered? But also, and more importantly for me, the gemini protocol has a very important philosophy: one page equals one call.

Basically, when you load a modern website your browser will make a lot of calls in the background to fetch all the related resources (stylesheets, scripts, images, more scripts, ads, even more scripts, etc). I've written about this before, when I compared a gemlog post to a typical blog post.

Here's that comparison (in geminispace, not on the web).

When I built my blog I decided to adopt this for the web side of things too. I don't inline images, I don't have external stylesheets (only two CSS rules anyway, linking to a stylesheet would take up more bytes), and I have no javascript.

No matter what happens with the Gemini protocol, I will definitely keep using gemtext. It's useful, simple, and it's helped me think differently about content and design. It's currently what I love most about Gemini.

-- CC0 ew0k, 2021-02-09