Hi Jeremy,
>Annoyingly, highlight.js only runs in the browser. I am not up to speed on the workings of javascript/nodejs as i only really ever use them when dealing with tiddlywiki but https://highlightjs.org/ says that it is available for node.js. Would this not be useable? >I can't duplicate it by rearranging the commands in editions/ tw5.com/tiddlywiki.info. I have made a zip with the results of my attempts to export. When using a custom theme but the standard $:/core/templates/static.template.html the below produce slightly different results. https://dl.dropboxusercontent.com/u/41230376/blogtest/export%20example.zip "example1": [ "--rendertiddler", "$:/core/templates/static.template.css", "static.css", "text/plain", "--rendertiddler", "$:/core/templates/static.template.html", "index.html", "text/plain" ], "example2": [ "--rendertiddler", "$:/core/templates/static.template.html", "index.html", "text/plain", "--rendertiddler", "$:/core/templates/static.template.css", "static.css", "text/plain" ], It looks as though example1 does not include the custom theme's data at all where as example2 does. The tiddlywiki.info also contains two builds which use a custom version of static.index.html which also produce differing results. I have included the custom theme under the "theme" folder if you would like to test this. >One way to fix it might be to make the rendertiddlers command accept multiple runs of arguments: I understand the rational :) I guess that because I wanted to run two separate filters using two separate static templates it wasn't really a considered use case. I wouldn't mind an option on rendertiddlers which signals whether or not to delete the folder's contents. To me having a very long list of filters and templates after rendertiddlers seems a little difficult to read. >I'm open to suggestions for how we might support custom tiddler paths This is a tough one, i think ideally for the "blog" posts i just want to link back down to the root and then up again like ../<field:created>/blogpost.html but for tags something like ../tags/programming.html So for blog posts tv-wikilink-template would have to be aware of the tiddler it was linking to, which would be pretty useful. For my tags stuff since they are autogenerated i am not sure how i would do that... One thing I thought of was that if there was a way to transclude the original shadow tiddler I could do everything as normal but within a custom $:/tags/ViewTemplate do something like tags: $:/tags/ViewTemplate title: $:/core/ui/ViewTemplate/tags \define tv-wikilink-template() ../tags/$uri_doubleencoded$.html TRANSCLUDE ORIGINAL $:/tags/ViewTemplate HERE I should have some free time over new year to work on this if you have ideas on how any of it should be implemented. Thanks, James On Tuesday, 16 December 2014 23:01:30 UTC+9, Jeremy Ruston wrote: > > Hi James > > On Mon, Dec 15, 2014 at 11:22 PM, James Anderson <[email protected] > <javascript:>> wrote: >> >> I have been working on exporting a subset of my tiddlywiki as a static >> blog. You can see my work in progress here >> https://dl.dropboxusercontent.com/u/41230376/blogtest/index.html All the >> posts aside from the top one are nonsense. >> > > Excellent. As I've said in another thread, I'm keen to establish a > blogging edition of TW5 on tiddlywiki.com, and would welcome any > contributions. > > >> 1. I can't get the highlight plugin to accept custom styles when exported. >> >> It looks as though the tags get stripped out. The CSS data is exported >> however. Katex seems to work though >> >> > Annoyingly, highlight.js only runs in the browser. To get it running under > Node.js we'd have to extend the "fake DOM" implementation to emulate more > of the DOM. > > >> 2. Batch building has issues >> >> I output everything individually as i have found that grouping >> rendertiddler commands causes issues. e.g. >> >> "index": [ >> >> "--rendertiddler", "$:/core/templates/static.template.css", >> "static.css", "text/plain", >> >> "--rendertiddler", >> "$:/themes/welford/phasersonkill-static/templates/static.index.html", >> "index.html", "text/plain" >> >> ], >> >> Results in index.html being empty, where as >> >> "index": [ >> >> "--rendertiddler", >> "$:/themes/welford/phasersonkill-static/templates/static.index.html", >> "index.html", "text/plain" >> >> "--rendertiddler", "$:/core/templates/static.template.css", >> "static.css", "text/plain", >> >> ], >> >> results in static.css missing my phasersonkill-static css data. >> >> > This seems like a bug. The rendertiddler command shouldn't have any side > effects. I can't duplicate it by rearranging the commands in editions/ > tw5.com/tiddlywiki.info. > > >> 3. RenderTiddlers deletes all existing files from a directory >> >> This is an issue for me because of the following and previous issues. I >> output a kind of dynamic set of tiddlers which keep track of tags to make >> up for the lack of a search in a static site. I do this in two batches >> (again see the original article for my tiddlywiki.info setup) and have >> to manually copy the output from ./tag to the parent folder. I'd Actually >> rather keep this file structure as it is but there is the next issue to >> consider. >> >> > I agree that rendertiddlers clearing the output directory is sometimes > inconvenient. The rationale was to try to make it easy to avoid ending up > with obsolete files when re-executing the command after removing some > tiddlers. > > One way to fix it might be to make the rendertiddlers command accept > multiple runs of arguments: > > > "--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain","[is[system]]","$:/core/templates/static.system.tiddler.html","static","text/plain","[all[shadows]]","$:/core/templates/static.shadow.tiddler.html","static","text/plain" > >> >> 4. One Size Doesn't Fit All for tv-wikilink-template >> >> I'd like to be able keep certian pages in separate folders. The current >> basic static site exporter kind of expects a relatively flat folder >> structure: >> >> ./index.html >> >> ./static/~ //all other tiddlers >> >> I'd prefer >> >> ./index.html >> >> ./tags/~ //tagging related tiddlers >> >> ./blog/~ //all other posts >> >> or even >> >> ./index.html >> >> ./tags/~ //tagging related tiddlers >> >> ./blog/<field:created>/~ //tiddlers exported under created date >> >> I don't see how i can use tv-wikilink-template in an elegant way to link >> to different folders. >> >> > I'm open to suggestions for how we might support custom tiddler paths. > Ideally, the same configuration could be used to drive routes in server.js > or a static rendering. > > Best wishes > > Jeremy. > > If anyone has solutions to these problems or has used the static website >> generator to any extent and has some advice, please let me know. >> The first issue is really just cosmetic, but i would like to fix it. The >> final 2 issues are big ones that i would like to address. A more robust >> solution setting the output location of RenderTiddlers would be ideal. but >> that needs to be developed with a better version of tv-wikilink-template >> (unless i am missing something) >> >> The issue i was having with tv-wikilink-template was that with a folder >> structure like this : >> >> ./index.html >> >> ./~ //all other posts >> >> ./tags/~ //tagging related tiddlers >> >> On "tags" article (linked in the banner) I'd want links to posts to point >> to the root directory while the tags themselves would point to the root >> directory. >> >> Thanks for any help, 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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] <javascript:> > -- 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.
