Wishlist: Truly Semantic Plain Text Markup

This is something in between “wishlist” and “proposal”, in that it’s something I really want, but don’t have the skills to create on my own. So I’m tossing this out into the world with the “lazyweb” tag to see if magic happens at some point.

UPDATE: Though written with Markdown as the initial focus, there are many different text markup systems with text-to-HTML (or other format) and vice versa processors, dating at least back to setext, which itself I think at least partially grew out of existing Usenet conventions at the time. So while my long use of Markdown as the underlying format for my text documents led me to focus there, Markdown itself is just one of many tools which all suffer from the same basic issue of confusing semantics and presentation. I’ve updated the title of this post accordingly and added this paragraph. And now back to the original post….

However much its creator currently bothers me, there’s no denying that Markdown is a very useful way of crafting text documents so that they’re easily convertible to HTML (among other formats).

Various people over the years have identified ways in which the original version of Markdown wasn’t quite what they were looking for, so there are a number of Markdown variants to choose from.

However, every version (at least, every version that I’ve looked into, I haven’t done an exhaustive survey) has the same limitation inherited from the original that drives me up the wall: None of them actually create proper semantic HTML.

In every variant, you have the option to create italicized text by wrapping text in single _underscores_ or *asterisks*, or bold text with doubled __underscores__ or **asterisks**.

However, those don’t actually output <i>/</i> or <b>/</b> tags; instead, they output <em>/</em> and <strong>/</strong> tags.

Now, that is what it says in the original specification, so all downstream implementations are following the lead of the original.

My contention is that this was a bad choice at the time, made worse over the years due to the proliferation of WYSIWYG editors that use buttons marked B and I as shortcuts for adding either Markdown underscores/asterisks or HTML em or strong tags.

Italics are not necessarily emphasis. For example, book titles (which, admittedly, should really be wrapped in <cite>/</cite> tags) are commonly represented with italics, as are the names of ships, such as the U.S.S. Enterprise. And, of course, there may be times when italics are used in a purely presentational manner.

Similarly, bold is not necessarily strong emphasis; it’s often used as a presentational style.

Now, when writing Markdown, since you can incorporate HTML and it just gets passed through to the final rendered HTML, it’s easy enough to create semantic final HTML by writing with a blend of Markdown and HTML markup. (I do this a lot.)

Unfortunately, in HTML to Markdown conversions, both <i> and <em> tags become single underscores or asterisks, both <b> and <strong> tags become doubled underscores or asterisks, and <cite> tags just disappear. There’s no way to retain the original semantics (assuming the original document was properly coded to begin with, of course) in the conversion; if you want clean and correct final output, you’ll have a lot of careful search-and-replace to recreate the semantically appropriate markup.

What I want is a Markdown variant that handles semantics properly in some way.

One possibility (though there may be reasons why these choices wouldn’t work; this is off the top of my head):

  • _single underscore_: creates <i>/</i> italic tags.
  • __double underscore__: creates <em>/</em> emphasis tags.
  • *single asterisk*: creates <b>/</b> bold tags.
  • **double asterisk**: creates <strong>/</strong> strong emphasis tags.

There’s probably a lot more that could be done to create a Markdown variant that supports text semantics well — citation tags, for example — but these are the ones that keep bothering me.

(And yes, I know there apparently is at least one project called “semantic markdown”, but it seems to be concerned with JSON and AI-readable text, and doesn’t address the particular semantics that I’m grumbling about.)

Self-Hosted Image Gallery Recommendations?

A lazyweb question: Is there decently modern web image gallery software anywhere?

I’d like to move away from Flickr in favor of self-hosting my photo galleries. But so far all the packages I’ve found are…well, they tend to look and feel (both on the backend admin side and the frontend public gallery side) like they haven’t been updated in the past decade or more.

Admittedly, sometimes this is because that’s exactly the case…which also doesn’t make me want to download them. But sometimes they’re still apparently under active development, but still look and feel like early-2000s projects.

Software I’ve installed, poked at, thought “mmm…well…maybe…”, and looked on to see what else I could find:

  • Piwigo is under active development (last release three weeks ago) but has rather sparse documentation if you’re not a developer building plugins, and needs config file editing just to display more than the most basic image metadata.
  • Zenphoto is also under active development (last release a month ago), but appears to be gearing for a more major update…which could be good, but there’s no indication of when that will happen, and much of the current installation (like every one of the default themes) has a “this has been deprecated” warning. So it doesn’t seem worth investing time into getting it up and running and populated if the current version is soon to be end-of-lifed, with who knows what sort of compatibility with the next version.

Things I’ve looked at but not downloaded:

  • 4Images may or may not be under active development; the last update was in November of ’21.
  • Coppermine‘s last update was in 2018…but the two before that were in 2013 and 2010, so who knows if it’s still active or not.
  • Gallery at least admits it’s dead; it points to Gallery Revival, which hasn’t been updated since November of ’21.
  • Pixelpost: “tldr: This project is abandoned, and has known security issues, use at your own risk.”
  • TinyWebGallery: I can’t quickly figure out when it was last updated, but the header graphic advertises “Flash uploaders”, and there are too many ads for online casinos on that page for me to bother digging around any further.

I’d like to stop giving Flickr money (I have nothing particularly against them, but at this point, I have nothing particularly for them either; their website doesn’t “give me joy”, and when embedding photos, the alt text is just the image title, not even the image comments, let alone any option to add true alt text), and I simply don’t trust Google enough to drop all my images into their systems. I’ve played with SmugMug as well, but again, I’d like to be able to self-host, not pay.

I’m a little surprised that this is such a sparse field, but I suppose that Flickr and Google Photos are “good enough” for most people these days, so there’s not a big market for people like me: a tech-savvy hobbyist photographer who’s not particularly interested in relentlessly pursuing monetization.

Recommendations would be appreciated if I’ve missed something worth investigating. As it is right now, though, I’m guessing my best bet will be to see what I can manage with either Piwigo or ZenPhoto.