I've created an issue to cover enhancing static HTML generation of the interactive widgets:
https://github.com/Jermolene/TiddlyWiki5/issues/1237 > An alternative to have widgets that work in a tiddlywiki and in static pages is to have another set of widgets prefixed 'static' - then changing the name of the widgets when building a static site - eg reveal becomes static-reveal. The static widgets could be put in a plugin. Interesting idea. We'd need a mechanism for switching the special widgets into action. We could accomplish that by introducing a cascade in widget.makeChildWidget() for creating child widgets, allowing widgets to override the widget name -> class mappings used by their child widgets. Best wishes Jeremy On Sat, Dec 13, 2014 at 3:16 PM, BJ <buggy...@gmail.com> wrote: > > An alternative to have widgets that work in a tiddlywiki and in static > pages is to have another set of widgets prefixed 'static' - then changing > the name of the widgets when building a static site - eg reveal becomes > static-reveal. The static widgets could be put in a plugin. > > I think that separating concerns like this would make the code more > maintainable. > > cheers > > BJ > > On Thursday, December 11, 2014 11:33:21 AM UTC-6, Jeremy Ruston wrote: >> >> Hi Arlen >> >> On Wed, Dec 10, 2014 at 11:16 PM, Arlen Beiler <arle...@gmail.com> wrote: >>> >>> Here is a modification to the RevealWidget that allows for other methods >>> of hiding the reveal section, including Javascript in static HTML. It >>> should be noted that EVERY reveal on the page will reveal. A little CSS >>> will fix that. This is a first step toward allowing tabs to work. If the >>> core devs think this would be a good addition, or something like it, I'd be >>> delighted. >>> >> >> Great, this is definitely an issue that needs sorting out. >> >> The other configuration variables that widgets support have the prefix >> "tv-" eg "tv-wikilink-template". >> >> To get this into the core I think we'd ideally want to have some CSS to >> make things work too. As per my reply to Jim above, I'm keen to create an >> official "blogging" edition, and perhaps it can demonstrate how to make >> things work. >> >> Best wishes >> >> Jeremy. >> >> >> >> >>> >>> This code is in RevealWidget.prototype.execute >>> >>> // Compute the title of the state tiddler and read it >>> this.stateTitle = this.state; >>> if(this.hasVariable("forceRevealWidget", true)) { >>> this.alwaysOpen = true; >>> } else { >>> this.alwaysOpen = false; >>> } >>> this.readState(); >>> >>> Add this as the first line of RevealWidget.prototype.readState >>> >>> if(this.alwaysOpen) { this.isOpen = true; return; } >>> >>> And I added the forceRevealWidget variable to the code I posted in the >>> other thread modifying server.js >>> >>> var text = state.wiki.renderTiddler("text/plain","$:/core/ >>> templates/static.tiddler.html",{ variables: { currentTiddler: title , >>> forceRevealWidget: true } }); >>> >>> If you want to use this code, feel free. The code in this email is >>> public domain. >>> >>> Best wishes, >>> -Arlen >>> >>> On Wed, Dec 10, 2014 at 4:55 AM, Tobias Beer <beert...@gmail.com> wrote: >>> >>>> What I would also find interesting is to load some tiddlers.json into >>>> each static file (the same for all) ...with tiddler meta-data, or even the >>>> body if anyone thinks it worthy, even the required helper functions to >>>> access the beast, and then use some jquery magick to do stuff with it, >>>> e.g... do TiddlyWiki stuff in the context of the statics site, however (!) >>>> optionally, so that google & co don't get hickups. >>>> >>>> The easiest functions being... >>>> >>>> $tids.getTiddler(title){} >>>> $tids.getTags(title){} >>>> $tids.getLink(title){} >>>> >>>> Best wishes, Tobias. >>>> >>>> -- >>>> 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 post to this group, send email to tiddl...@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/tiddlywiki. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> 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 post to this group, send email to tiddl...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/tiddlywiki. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> -- >> Jeremy Ruston >> mailto:jeremy...@gmail.com >> > -- Jeremy Ruston mailto:jeremy.rus...@gmail.com -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.