Static render suppress URI encode

Visto 40 veces
Saltar al primer mensaje no leído

Tristan

no leída,
16 ene 2022, 5:24:0216/1/22
a TiddlyWiki
To make prettier permalinks for my setup and making the URL hackable I changed my render command. All files do get created but internal links are still URI encoded and therefore do no longer work:

tiddlywiki . --render "[!is[system]]" "" "text/plain" "$:/core/templates/static.tiddler.html" --render "$:/core/templates/static.template.css" "static.css" "text/plain"

Tiddler 2022/010 results in a file 010.html inside 2022. But all links still use default 2022%252F010%252F0.html which breaks all internal links. I think I have to modify tv-wikilink-template in  $:/core/templates/static.tiddler.html but how?

Tristan

no leída,
25 ene 2022, 10:31:4725/1/22
a TiddlyWiki

Unfortunately I was not able to figure out how to influence the filename generation. My custom HTML template does not create anything other than the content. I could not find where in the saving process Tiddlywiki messes with my filenames so I could stop it and have it create a nested folder structure as intended.

Does anyone use TW as I static site generator and willing to chip in?

Jeremy Ruston

no leída,
25 ene 2022, 18:18:0325/1/22
a TiddlyWiki Group
Hi Tristran

The templates that we use in the core for static rendering generally include a definition of `tv-wikilink-template` at the top of the template. For example, $:/core/templates/static.tiddler.html starts with the following line:

\define tv-wikilink-template() $uri_doubleencoded$.html

If you’re using a custom template then you can modify that declaration according to the instructions here:


Alternatively, you can omit the definition from the template and instead specify the variable as part of the render command.

Best wishes

Jeremy



-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/426bee7b-b0bf-481a-a637-d7c7c2259c83n%40googlegroups.com.

Tristan

no leída,
26 ene 2022, 14:46:3226/1/22
a TiddlyWiki
It worked! Thank you Jeremy!

I was banging my head against the table because I had it working a few years back and could not figure out how I did it back then :D
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos