I’m generating a static version of my wiki, and I’d like to adjust the links between tiddlers to match the directory structure that I want to use.
To do this, I adjusted the template used to render each tiddlers, adding a definition to generate the proper href for each link, as follows:
\procedure tv-get-export-link(to) <$text text={{{[<to>get[created]format:date[../YYYY]addsuffix[/]] [<to>encodeuricomponent[]encodeuricomponent[]addsuffix[.html]] :reduce[addprefix<accumulator>]}}}/>
that code creates texts like “…/year-of-tiddler-creation/tiddler-title.html”
however, I’m not getting the expected result; the target for each link, in the static HTML I receive, is just the code for the procedure; in other words, all links point to <$text text={{{[<to>get[created]format:date[../YYYY]addsuffix[/]] [<to>encodeuricomponent[]encodeuricomponent[]addsuffix[.html]] :reduce[addprefix<accumulator>]}}}
when I define tv-get-export-link
as a macro, (and use [$to$]
instead of <to>
in my filtered transclusion), $to$
is interpolated as expected, but the link href value is now the body of the macro, with $to$
interpolated, but the rest of the macro code is not executed.
… is this a bug in tv-get-export-link
/the <$link>
widget?
EDIT: I forgot to mention: when I test the procedure/macro definitions in a live TW, I get the expected result (e.g., …/2025/index.html, for a tiddler called index.)