tiddlywiki --verbose --load mywiki.html --rendertiddlers <filter> <template> <pathname>I am trying to 'present' or 'export' TiddlyWiki 5 HTML to either Static HTML or view only TW5.
Or is there a theme that would allow you to lock out the edit and modification stuff?(Undoing this might be the hardest part as once you turn it on how would you turn it off?)
Hope this technique helps.
Is there an HTML dump inside TiddlyWiki? A Tiddlers 'export' method? Something that converts all TW5 content pages to individual static HTML pages? I know this bloats everything. Except it defeats the functionality of TW5. That is both good and bad thing depending on how you look at it.
You could create a startup module that exports after the story module
and conditionally disables the save handlers…
$tw.rootWidget.addEventListener("tm-auto-save-wiki", function() {});
$tw.rootWidget.addEventListener("tm-save-wiki", function() {});
…if the admin tiddler has not been loaded into the river (via #backend
in the url);
This way the save will be disabled completely.
Not sure this approach is necessary, since you can simply remove the buttons or modify the save settings in the same startup module...
but, would you have some code-snippet that does what you suggest, i.e. loading the ore save-listeners depending on whether or not we start the wiki with the "backend" tiddler?
/*\
title: foobar.js
type: application/javascript
module-type: startup
@preserve
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
exports.name = "foobar";
exports.platforms = ["browser"];
exports.after = ["story"];
exports.synchronous = true;
exports.startup = function() {
var tObj = $tw.wiki.getTiddler("$:/StoryList");
var isSavingEnabled = tObj.fields["list"].indexOf("backend") >= 0;
alert("Saving enabled? " + isSavingEnabled);
if(!isSavingEnabled) {
// otherwise disable save and autosave
$tw.rootWidget.addEventListener("tm-auto-save-wiki", function() {});
$tw.rootWidget.addEventListener("tm-save-wiki", function() {});
};
};
})();