-- Leo's gemini proxy

-- Connecting to michaelnordmeyer.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

Self-Inflicted Markdown vs. Gemtext Pain


My website and Gemini capsule have almost identical content, except for a couple of posts, which don’t fit one or the other. They are both served from the same domain after all, where only the protocol differs.


My Website

This Capsule


I like writing Markdown, but I like writing Gemtext more. I start in Markdown, because for some reason the VSCode spell checking plugin I use (Spell Right) doesn’t spell-check `.gmi` files. It should, it is configured to do so, but it doesn’t. Whatever.


I deliberately didn’t create or use any tooling to create my gemlog, because I like the minimalist approach of Gemtext and, when done right, the strict adherence to a file system hierarchy, for which Gemini browsers have the built-in shortcuts “up” and “go to root”. Because they don’t exist in web browsers, I use the minimalist version of just `/post-title` without a trailing slash on the web, which makes generating from the same source for both a little harder. And finally, my Gemlog can be subscribed to without an Atom feed, which is why it is on its own page.


A couple of days ago, I checked out Sandra’s 7off, a Chicken Scheme app to convert Markdown to Gemtext, and I felt stupid. Because when utilizing the title tag in Markdown, this could be the link text in Gemtext.


7off


As a weak excuse I could write that I never use them in Markdown, because they don’t work on mobile, and that I use inline links and not references:


A [link](https://example.com/) in a praragraph.

instead of


A [link][1] in a praragraph.

...

[1]: https://example.com/

The reason I don’t like references is, that I want to have the numbering ordered, which makes adding links afterwards tedious. I also don’t like to put the references at the bottom of the post, because I mentally lose context in longer posts, especially if I look at the posts months or years later. I like to look at a link in the place where it’s linked and know where it points to.


A middle path could be to name the references while putting them right after the paragraph:


A [first link][fl] in a praragraph.

[fl]: https://example.com/

A [second link][sl] in a praragraph.

[sl]: https://example.net/

This comes quite close to how I do it in Gemtext:


A first link in a praragraph.

=> gemini://example.com/ The first link

A second link in a praragraph.

=> gemini://example.net/ The second link

If I add titles to the Markdown links, they look almost the same, except for the brackets and quotes:


A [first link][fl] in a praragraph.

[fl]: https://example.com/ "The first link"

A [second link][sl] in a praragraph.

[sl]: https://example.net/ "The second link"

Now I would have gained the ability to convert Markdown to Gemtext without creating a worse version for Gemtext, because the linked words of a paragraph in Markdown don’t make great link texts on Gemini. Titles for the win!


References need to be short for aesthetic reasons, otherwise the difference to Gemtext would be too great. Yeah, I know.


I could keep the syntax hint on code-fences, because it adds a little context to Gemtext as well. Same goes for emphasis and strong, which I don’t really use in Markdown anymore, and is not too bad in Gemtext, even though it’s better without. Looks like I have covered all the bases.


It could have been nice, but Google spammed me about errors in Google’s search console. I recently moved static files I link to in a few posts to their own `/files` directory, like text or PDF files. But because I cannot set a HTML header on PDF files to point to the canonical version, I get “Duplicate without user-selected canonical” errors. While technically correct, there’s not much I can do about them.


Google’s Search Console


Except showing the mighty G the finger and setting a `rel="nofollow"` on the link and returning a `X-Robots-Tag: "noindex"` HTTP response header. I don’t gain much by having text or PDF files indexed by anyone anyway.


The only problem is, that `rel="nofollow"` has to be set manually on specific links, which is AFAIK not possible for Markdown references, but possible if using the kramdown Markdown parser with Jekyll, like I do. Then I end up using inline links again:


A [link](https://example.com/){: rel="nofollow"} in a praragraph.

The circle closes, I’m still using inline links, and I only got a measly post out of it.


Why can’t we have nice things?


Update 2024-04-18


Always do a little more research than you think you need to do. There is a way to send the canonical link with a HTTP header (`link: <uri>; rel="canonical"`), but from experience it can take months for big G to actually respect it, because the old URL is obviously redirected to the new one. You have to do it immediately when publishing the new link. Regardless, I will keep those files not indexed.

-- Response ended

-- Page fetched on Sat May 4 02:57:35 2024