Syntax for block level metadata?

What do you think is the best syntax for “block level metadata”? For “metadata” I just mean “fields”.

For example we can use AI to auto extract keywords for each paragraph, and put this metadata like:

A paragraph of sentences.&&{"keyword":"paragraph"}&&

JSON fenced with && won’t be rendered, but may be discovered by indexer or filter search.

@@&&{"keyword":"paragraph"}&&
A paragraph of sentences.
@@

Just whiteboarding.

This is better for the parser to parse, and we can get info from the widget tree easier. It requires more typing if typed by a human.

But maybe the user will only use some plugin to get a form (like screenshot from siyuan below) to input , so this is ok.

Note: I didn’t say I liked the @@&&{...}&&@@ construct but I did feel it was more wikitext-ish than the original. Perhaps it’s possible to remove && → @@{...}@@

I’d also consider using @pmario’s custom parser if it’s possible.

And of course, it’s also possible to use custom elements right out of the box:

<keyword:paragraph>
A paragraph of sentences.
</keyword:paragraph>

<about-mars>
Stuff about planet Mars.
</about-mars>

<search-cloud style="display:none">
list of search terms
</search-cloud>

Using arbitrary html tags and even attributes is the first thing that comes to mind, however you can make use of comments as well;

<!-- and within them you can establish your own parametrization {"keyword":"paragraph"} -->

However if you really are using AI, why stop with embedding this code behind and just use tiddlywikis features like in your example;

Not;

A paragraph of sentences.&&{“keyword”:“paragraph”}&&

But;

A [[paragraph]] of sentences.

With the tiddler “paragraph” tagged keyword.

Then all the other backlinks and references suddenly become available and “paragraph” can gain its own metadata as its a tiddler.

In a similar way you could leverage Marios uni-link “alias” plugin to use more advanced representations within the link.