Open graph and TiddlyWiki tiddlers

Folks,

In a previous post I included the following link
https://mklauber.github.io/tw5-plugins/#Shuffle%20Operator

In the preview windows after I pasted it I saw the following;

Snag_a4c68e6

This works great for a lot of links, including here ins discourse. I believe pursuing this for tiddlywiki has being discussed before but I do not know how to find where we are at with this because of the jargon.

My question is could we find a way to provide our wikis or the specific tiddler this oEmbed / OpenGraph tags such as description, image?

  • Presumably it needs to be included in the html that renders each tiddler at its permalink address.
  • This sounds quite achievable, even if it had to be chosen when setting up a particular wiki.
  • I understand the metadata is “document” or "HTML page based, this can be introduced by a tiddler with a “raw” tag
  • then the only trick being to provide a link or preview of the rendered tiddler - This I think may be impossible.
  • I have some seen some mention that metatag are now legal in the body (tiddlers) but otherwise it is “illegal”.

It can be done only for the entire wiki, not for individual tiddlers. Only the HTML for the home page is fetched and there is only one <head> tag, and #anchors are ignored.

I had previously written about this on the Fission site and gotten an answer:

I got this to work by making a new tiddler, content-type text/plain, and adding the tag $:/tags/RawMarkup to it. From: https://tiddlywiki.com/#SystemTag%3A%20%24%3A%2Ftags%2FRawMarkup

Maybe you know this already, or I’m misunderstanding what you need? But this page is what showed up when I googled something similar. It helped me have other apps & sites see opengraph metadata for my own site: Thanael’s Site — A Single Homepage App

Thanael’s site in turn links to a Stack Overflow post describing OG tags to use.

2 Likes

I suppose the Question is could a metadata tag “reference or extract” any other information and present it to the preview such as the #tiddlername on the URI

No, because anchor tags are not “visible” across the network.

It’s one of the reasons to render TW as a static site where there are separate actual HTML pages, which can have custom head tags.

Ah, lets re-phrase that

“we can include tiddler specific metadata, in static pages”

Single File Wikis

Personally I have wanted to ensure I could generate static html tiddler pages in which any interaction, like an “internal link” would link back to the full tiddlywiki. This is another reason to do so.

Given this information there are three steps to use “open Graph and TiddlyWiki Tiddlers”

  • Configure a method to store suitable metadata for the whole wiki and each tiddler
  • Provide a site export that generates individual html files for each tiddler incorporating wiki and tiddler metadata in the resulting files. Also these tiddlers would link back to full wiki.
  • When posting links use a slightly modified address to reference the html tiddler rather than the tiddler within the wiki.
    • An alternate version of the copy permalink button that “generates” the link to the HTML tiddler (assuming its there).

Open Graph and Node Tiddlers

Node served wikis have the ability to present all tiddlers as static html automatically in addition to the interactive.

So to To support node implementations;

  • Allow inclusion of the metadata in tiddlers in the same way as for “static tiddlers” on single file wikis
  • Modify the template for presenting the static tiddlers on the server to place the tiddlers metadata in the correct part of the html tiddler so generated.
  • Use the same or modified method to copy a permalink to the static page.

I expect it makes more sense to automatically generate metadata information for each tiddler such as using the tiddler title and its link, the description and/or information found in a custom field eg; “link-metadata”