Hi Jeremy
Issue: the extra <p> tags in rendered .html output
Description of issue:
Rendering and generating static pages (static website) has got a lot of attention! Tiddlywiki on Node.js can simply produce static pages from selected tiddlers. but there is an issue and it is extra <p> tag in the output!
Question
From Ref[0] above: Is there any way to use --render and prevent the extra <p> tag generation? I use a grid layout for static website generated by TW-5.1.22 and these <p> tags make to destroy the grid layout.
"static":[
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/templates/static.tiddler.html", "static", "text/plain",
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/mytemplate-wrapper", "static", "text/plain",
"--rendertiddler", "$:/kookma/templates/static.template.css", "static/static.css", "text/plain"
]
To generate the static pages, in terminal I use
tiddlywiki --build static
Answer
From Ref[1,2]:
- Use a wrapper template with below contents. It is called $:/kookma/templates/static.tiddler-wrapper.html
<$view tiddler="$:/kookma/templates/static.tiddler.html" format="htmlwikified" mode="inline”/>
- Correct the build static as below to use the wrapper template instead of original one
"static":[
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/templates/static.tiddler-wrapper.html", "static", "text/plain",
"--rendertiddlers", "[!is[system]tag[public]]", "$:/kookma/mytemplate-wrapper", "static", "text/plain",
"--rendertiddler", "$:/kookma/templates/static.template.css", "static/static.css", "text/plain"
]
Result
Unsuccessful! Using the new wrapper template with the above build command renders tiddlers like below
<code><!doctype html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="generator" content="TiddlyWiki" /> <meta name="tiddlywiki-version" content="</code>5.1.22<code>" /> <meta name="viewport" cont
It seems
htmlwikified is not working!
What do you think?
--Mohammad