Hi James

> When you export a static tiddler the content directly below <section
class="tc-story-river">  is wrapped in a <p> like below....

The problem is that TW generates a <p> tag to contain the content of the
tiddler. In HTML <p> tags are only supposed to contain inline elements.
When the browser encounters a <div> it automatically closes the <p> tag.

I'm not sure that there is an easy fix for this. I've created a ticket:

https://github.com/Jermolene/TiddlyWiki5/issues/1206

Best wishes

Jeremy.





On Sun, Dec 7, 2014 at 1:56 PM, James Anderson <[email protected]>
wrote:

> This is great feature by the way, I write all my coding/study notes in
> tiddlywiki and i used to use wordpress to blog about things. Having the
> ability to just export anything from my notes tagged "blog" as a static
> webpage is such a time saver. Having the plugins like katex just work is
> also impressive.
>
>
> On Sunday, 7 December 2014 22:16:34 UTC+9, James Anderson wrote:
>>
>> Hi Jeremy,
>>
>> I'm not sure what i was doing wrong before but it now seems to be
>> exporting the static site with whatever theme the loaded TW is set to.
>> Thanks for you help.
>>
>> I have spotted a potential issue though. When you export a static tiddler
>> the content directly below <section class="tc-story-river">  is wrapped
>> in a <p> like below....
>>
>> <section class="tc-story-river">
>> <p>
>>
>> <div class='tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists 
>> tc-tiddler-shadow  '>
>>
>> ...more tiddler content...
>>
>> </div>
>>
>> </p>
>>
>>
>> which doesn't seem legal as when viewed in both IE and Chrome it is
>> interpreted as the tc-tiddler-frame div being wrapped by two separate
>> <p></p> tags like in the attached image. This makes formatting things a
>> little difficult especially when adding a static banner.
>>
>> I have uploaded and example here: http://welford.github.
>> io/GettingStarted.html
>>
>> Thanks,
>> James
>>
>>
>>
>>
>> On Wednesday, 3 December 2014 07:46:25 UTC+9, Jeremy Ruston wrote:
>>>
>>> Hi James
>>>
>>> My theme is set to $:/themes/welford/phasersonkill but vanilla is in
>>>> the output.
>>>>
>>>
>>> Is the theme setting within the HTML file? I think you'll need to set
>>> the theme within the wiki folder, too, because the theme mechanism does
>>> it's initialisation before the HTML file has been loaded.
>>>
>>> Best wishes
>>>
>>> Jeremy.
>>>
>>>
>>>
>>>>
>>>> James
>>>>
>>>> On Wednesday, 3 December 2014 07:32:08 UTC+9, Jeremy Ruston wrote:
>>>>>
>>>>> Hi James
>>>>>
>>>>> > Any idea what else i could be doing wrong?
>>>>>
>>>>> Only the CSS for the currently selected theme will appear in the
>>>>> generated output. So you'll need to select one of your custom themes (by
>>>>> placing the theme name in the tiddler $:/theme) in order to see it.
>>>>>
>>>>> Best wishes
>>>>>
>>>>> Jeremy
>>>>>
>>>>>
>>>>> On Tue, Dec 2, 2014 at 9:54 PM, James Anderson <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Jeremy,
>>>>>>
>>>>>> Thank you for taking the time to write a detail reply. Following your
>>>>>> method appears to work in that I can see the default tiddlywiki themes 
>>>>>> now
>>>>>> in the css, however i am still unable to export my own themes.
>>>>>>
>>>>>> my batch is:
>>>>>>
>>>>>> tiddlywiki ./tw --load ./notes.html --output ./blog --build static
>>>>>>
>>>>>>
>>>>>> my tiddlywiki.info contains
>>>>>>
>>>>>> {
>>>>>>     "plugins": [
>>>>>>     ],
>>>>>>     "themes": [
>>>>>>         "tiddlywiki/vanilla",
>>>>>>         "welford/phasersonkill",
>>>>>>         "welford/readonly"
>>>>>>     ],
>>>>>>     "build": {
>>>>>>         "static": [
>>>>>>             "--rendertiddler", "$:/core/templates/static.template.css", 
>>>>>> "static.css", "text/plain"
>>>>>>         ]
>>>>>>     }}
>>>>>>
>>>>>>
>>>>>> I can see the vanilla css data within static.css but none of my
>>>>>> custom theme has made it through.
>>>>>>
>>>>>> Any idea what else i could be doing wrong?
>>>>>>
>>>>>> Thanks,
>>>>>> James
>>>>>>
>>>>>>
>>>>>> On Tuesday, 2 December 2014 07:49:03 UTC+9, Jeremy Ruston wrote:
>>>>>>
>>>>>>> Hi James
>>>>>>>
>>>>>>> One small issue is that the output type should be "text/plain":
>>>>>>>
>>>>>>> tiddlywiki --load ./notes.html --output ./ --rendertiddler
>>>>>>> $:/core/templates/static.template.css ./static.css text/plain
>>>>>>>
>>>>>>> The bigger problem is that the --load command doesn't unpack plugins
>>>>>>> contained in the HTML file into shadow tiddlers, which means that your
>>>>>>> generated CSS is missing the CSS from the current theme.
>>>>>>>
>>>>>>> This is happening because you're not specifying a wiki folder on the
>>>>>>> command line. That makes TiddlyWiki start up with an empty in-memory 
>>>>>>> wiki.
>>>>>>> The solution is to create a basic wiki folder that specifies the plugins
>>>>>>> that you'll need when generating the CSS.
>>>>>>>
>>>>>>> 1. Create a new folder
>>>>>>> 2. Add a file called "tiddlywiki.info" with the following content:
>>>>>>>
>>>>>>> {
>>>>>>> "plugins": [
>>>>>>> ],
>>>>>>> "themes": [
>>>>>>> "tiddlywiki/vanilla",
>>>>>>> "tiddlywiki/snowwhite",
>>>>>>> "tiddlywiki/nighttime",
>>>>>>> "tiddlywiki/starlight",
>>>>>>> "tiddlywiki/seamless",
>>>>>>> "tiddlywiki/stickytitles",
>>>>>>> "tiddlywiki/centralised",
>>>>>>> "tiddlywiki/readonly"
>>>>>>> ],
>>>>>>> "build": {
>>>>>>> "static": [
>>>>>>> "--rendertiddler","$:/core/templates/static.template.html","
>>>>>>> static.html","text/plain",
>>>>>>> "--rendertiddler","$:/core/templates/alltiddlers.template.ht
>>>>>>> ml","alltiddlers.html","text/plain",
>>>>>>> "--rendertiddlers","[!is[system]]","$:/core/templates/static
>>>>>>> .tiddler.html","static","text/plain",
>>>>>>> "--rendertiddler","$:/core/templates/static.template.css","s
>>>>>>> tatic/static.css","text/plain"]
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> 3. Execute the following command in the terminal:
>>>>>>>
>>>>>>> tiddlywiki ./mywikifolder --load ./notes.html --build static
>>>>>>>
>>>>>>> Note that by including the rendertiddler command in the
>>>>>>> tiddlywiki.info you can avoid retyping it and instead trigger it
>>>>>>> with the build command.
>>>>>>>
>>>>>>> Best wishes
>>>>>>>
>>>>>>> Jeremy.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Dec 1, 2014 at 9:23 PM, James Anderson <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am using a batch file to run the following:
>>>>>>>>
>>>>>>>>  tiddlywiki --load ./notes.html --output ./ --rendertiddler 
>>>>>>>> $:/core/templates/static.template.css ./static.css text/css
>>>>>>>>
>>>>>>>>
>>>>>>>> Which only seems to export the first css it comes across to
>>>>>>>> static.css, though when I look in notes.html at
>>>>>>>> $:/core/templates/static.template.css   it contains all the css
>>>>>>>> tiddlers from my TW.
>>>>>>>>
>>>>>>>> Is there something wrong with my command? Or is there a bug with
>>>>>>>> --rendertiddler  ?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> James
>>>>>>>>
>>>>>>>>  --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "TiddlyWikiDev" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> To post to this group, send email to [email protected].
>>>>>>>> Visit this group at http://groups.google.com/group/tiddlywikidev.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jeremy Ruston
>>>>>>> mailto:[email protected]
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jeremy Ruston
>>>>> mailto:[email protected]
>>>>>
>>>>
>>>
>>>
>>> --
>>> Jeremy Ruston
>>> mailto:[email protected]
>>>
>>


-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to