I am in the process of migrating my website from Hugo to TW so I have one piece of software less to worry about. Whilst porting the templates I stumbled upon the fact that transclude
and view
seem to add an additional newline. This seems to happen for every HTML tag I want to transclude stuff into. Those newlines unfortunately breaks some things (the link
in this example was just the first I noticed). I tried \whitespace trim
, $mode="inline"
, $output="text/plain"
and checked $:/config/blog/link
for a newline at the end - which there is none.
title: $:/blog/template
`<!doctype html>
<html>
<head>
<link href="`<$transclude $tiddler="$:/config/blog/link" />`" />
</head>
</html>`
title: $:/config/blog/link
https://example.com
> node ./tiddlywiki.js ~/blog --render "[!is[system]]" "" "text/plain" "$:/blog/template"
Output:
<!doctype html>
<html>
<head>
<link href="https://example.com
" />
</head>
</html>
I guess I am missing some magic flag or something?
EDIT: @etardiff pointed out, that I forgot the backticks in the template tiddler.