Hi everyone, Many static site generators support "shortcodes" that people use for quickly making youtube embeds etc. I've made a plugin that uses the new HTML.get_tag_name and HTML.select_any_of functions. It adds a bunch of fake HTML elements for easily making links to popular sites: Currently supported elements: <wikipedia lang="de" page="Philippe Soupault">surrealist writer</wikipedia> <github project="dmbaturin/soupault">soupault</github> <sourcehut project="dmbaturin/soupault">soupault</sourcehut> <rfc number="1945">HTTP RFC</rfc> All elements also support a short form where the content becomes the link data: <wikipedia>Philippe Soupault</wikipedia> <github>dmbaturin/soupault</github> <sourcehut>dmbaturin/soupault</sourcehut> <rfc>RFC1945</rfc> # it can extract the number from this Any ideas what else may be useful? Youtube perhaps? Anything else?
I've cleaned up the code and added support for <mastodon>@email@example.com</mastodon> and <twitter>@user</twitter>. The former is converted to https://example.com/@user, the latter can work with both "user" and "@user" formats. This should be enough for a demonstration of the power of fake elements and most practical cases I guess, but I wonder if there's a universally supported format for ActivityPub-based sites (GNU Social, Pleroma...). It may also be nice to make a separate plugin for media embeds (youtube, vimeo, soundcloud etc.)
when I am done with some more plugins i am working on, I will look at your code for this... my thoughts are modify the code so that it just reads a text file for settings..1 plugin.. just keep adding the new site links...