Hi there, this time what I need to do is simple, I think, but not easy.
I have some tiddlers in my TiddlyWiki with MIME text/markdown
, and they visualize fine in the TiddlyWiki web app with the markdown-it ($:/plugins/tiddlywiki/markdown
, included in the official plugin repository) plugin installed. I can even export them to static HTML no problem, with the “export tiddler” button.
However, if I try to export those tiddlers via tiddlywiki
CLI, they get rendered as if they where WikiText (for example, I see lines starting with #, indicating headings in Markdown, get rendered as ordinated list items in the static HTML)… this is a problem.
For reference, my render command is:
--rendertiddlers "[prefix[sitoctt:/]]" "$:/sitoctt/sitoctt.html" . text/plain
$:/sitoctt/sitoctt.html
is just my render template, that I derived by adding extra code to $:/core/templates/static.tiddler.html
, but if I were to use this latter built-in one as my render template, I would have the exact same issue.
I suspect the culprit to be this line in the render template:
<$view tiddler="$:/core/ui/ViewTemplate" format="htmlwikified"/>
It specifies for the content to be rendered in htmlwikified
format, and this might be forcing TiddlyWiki to call the WikiText parser, instead of the Markdown one when needed.
If I edit the line to not specify anything, transclusion of the content into the render template doesn’t work. If I use the {{!!text}}
syntax, or <$transclude/>
, I just get a plaintext representation.
The ViewWidget documentation doesn’t help, and neither does the documentation included with the Markdown plugin.
I also tried editing the line to random combination of format=
, like format="markdown"
, format="markdown-it"
, format="text/markdown"
, but nothing works.
Does anyone have any suggestion? Thank you…