💾 Archived View for nytpu.com › gemlog › 2021-09-16.gmi captured on 2023-01-29 at 16:20:43. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

➡️ Next capture (2024-05-10)

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

↩ go back to index

gracefully degrading markup

september 16, 2021

On Mastodon Glitch-Soc, markdown is supported in toots so you can get emphasis and bold and all that. But, in official Mastodon will strip out *all* formatting (HTML tags since that's what the markdown is rendered to). So when writing, you have to be mindful of what it'll read like without markup. It really gets you into the mindset of what emphasis and such was pre-digital, and early digital when most stuff was still plaintext: emphasis and markup should /enhance/ the meaning of the text, not /provide/ the meaning (or introduce a completely different meaning).

However, unlike on something like Gemini, you still do have markup. So you can provide markup that gives an extra special little enhancement to the text, but it'll still degrade to plaintext in some instances. This specific sitation has gotten me into thinking about the concept of “gracefully degrading” markup. You could write something with full markup, but as long as you're careful then it could be hosted anywhere, the different protocols/document types support whatever markup they can and can ignore the rest with no issues.

And it's not even limited to emphasis, it can also apply to links and such. To use an example, I use a lot of footnotes in my gemlog, particularly older posts. I've seen people complain about footnotes (rightfully so); the thing is, I don't mean the footnotes to be an “interrupt your reading to click this link,” I mean it as “if you're interested in more about this, you can read this link in your own time.” To make it convey that intention, I started instead using a “see also” list of links at the end of the section of writing so you don't have “ᵃ,” “ᵇ,” etc. constantly interrupting your reading. But in HTML, I could still provide those inline links just fine (as long as you keep your links subtle instead of BRIGHT BLUE & UNDERLINED). So there's a degradation again: HTML & co. could have subtle inline links, Gemtext could have a “see also” footer, and plaintext like Gopher I could have a “see also” footer but I could also just remove the links entirely since they're not integral to the text.

I'm really fond of the idea of a markup that allows me to provide as much markup as I want, and when exporting to a format it would automatically strip out or modify the markup not supported by that format. I've found semantic markup such as mdoc(5) to be great for this, because since things have a real semantic meaning instead of a presentation meaning it allows things to be easily rearranged or modified as necessary. For instance, using a cross-reference in mandoc will provide a link to the linked page in HTML, markdown, and such; emphasis on systems without links such as a terminal; and then a plaintext cross-reference on everything else. Of course, mdoc is domain-specific for just man pages; I've seen a few people write their stuff in roff(5), but that's more regular markup than semantic.

A gemlog post (or general writing) specific semantic markup would be pretty great. You could then have really important emphasis that could be “ported” to plaintext using slashes or stars, then less important emphasis that would be stripped out, and the same thing with links. You could have links that are always kept because they're integral to the document, and then “see also” links that can be removed if necessary. It's a neat idea but I have so many other personal projects that I may never get around to it. Although, how hard can writing a roff macro set be? Or just my own Lua (or even awk) script for simplicity.

↩ go back to index

add a comment!

view likes and comments

contact: alex [at] nytpu.com

backlinks

-- Copyright © 2021 nytpu - CC BY-SA 4.0