diff --git a/bld.cmd b/bld.cmd index 3511cd541..18a809c5b 100644 --- a/bld.cmd +++ b/bld.cmd @@ -31,7 +31,7 @@ node .\tiddlywiki.js ^ --verbose ^ --rendertiddler ReadMe .\readme.md text/html ^ --rendertiddler ContributingTemplate .\contributing.md text/html ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\index.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^ --rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^ --rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\static\static.css text/plain ^ --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\static text/plain ^ @@ -43,7 +43,7 @@ node .\tiddlywiki.js ^ .\editions\tw5.com ^ --verbose ^ --password password ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^ || exit 1 rem Third, empty.html: empty wiki for reuse @@ -51,7 +51,7 @@ rem Third, empty.html: empty wiki for reuse node .\tiddlywiki.js ^ .\editions\empty ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\empty.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\empty.html text/plain ^ || exit 1 rem Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS @@ -59,7 +59,7 @@ rem Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS node .\tiddlywiki.js ^ .\editions\tahoelafs ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^ || exit 1 rem Fifth, d3demo.html: wiki to demo d3 plugin @@ -67,7 +67,7 @@ rem Fifth, d3demo.html: wiki to demo d3 plugin node .\tiddlywiki.js ^ .\editions\d3demo ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^ || exit 1 rem Sixth, codemirrordemo.html: wiki to demo codemirror plugin @@ -75,7 +75,7 @@ rem Sixth, codemirrordemo.html: wiki to demo codemirror plugin node .\tiddlywiki.js ^ .\editions\codemirrordemo ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^ || exit 1 rem Seventh, codemirrordemo.html: wiki to demo codemirror plugin @@ -83,7 +83,7 @@ rem Seventh, codemirrordemo.html: wiki to demo codemirror plugin node .\tiddlywiki.js ^ .\editions\markdowndemo ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^ || exit 1 diff --git a/bld.sh b/bld.sh index 5e6555dd5..9eabe0a09 100755 --- a/bld.sh +++ b/bld.sh @@ -37,7 +37,7 @@ node ./tiddlywiki.js \ --verbose \ --rendertiddler ReadMe ./readme.md text/html \ --rendertiddler ContributingTemplate ./contributing.md text/html \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \ --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ --rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \ --rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \ @@ -49,7 +49,7 @@ node ./tiddlywiki.js \ ./editions/tw5.com \ --verbose \ --password password \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/encrypted.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/encrypted.html text/plain \ || exit 1 # Third, empty.html: empty wiki for reuse @@ -57,7 +57,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/empty \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/empty.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/empty.html text/plain \ || exit 1 # Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS @@ -65,7 +65,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/tahoelafs \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \ || exit 1 # Fifth, d3demo.html: wiki to demo d3 plugin @@ -73,7 +73,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/d3demo \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/d3demo.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/d3demo.html text/plain \ || exit 1 # Sixth, codemirrordemo.html: wiki to demo codemirror plugin @@ -81,7 +81,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/codemirrordemo \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \ || exit 1 # Seventh, codemirrordemo.html: wiki to demo codemirror plugin @@ -89,7 +89,7 @@ node ./tiddlywiki.js \ node ./tiddlywiki.js \ ./editions/markdowndemo \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ || exit 1 # Eighth, run the test edition to run the Node.js tests and to generate test.html for tests in the browser diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index 5764d8f08..116c47adf 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -221,7 +221,7 @@ var Command = function(params,commander,callback) { Command.prototype.execute = function() { var port = this.params[0] || "8080", - rootTiddler = this.params[1] || "$:/core/templates/tiddlywiki5.template.html", + rootTiddler = this.params[1] || "$:/core/save/all", renderType = this.params[2] || "text/plain", serveType = this.params[3] || "text/html", username = this.params[4] || "ANONYMOUS"; diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 3cad3b409..b5f4ed9b3 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -871,7 +871,7 @@ Save the wiki contents. Options are: */ exports.saveWiki = function(options) { options = options || {}; - var template = options.template || "$:/core/templates/tiddlywiki5.template.html", + var template = options.template || "$:/core/save/all", downloadType = options.downloadType || "text/plain"; var text = this.renderTiddler(downloadType,template); this.callSaver("save",text,function(err) { diff --git a/core/templates/save-all.tid b/core/templates/save-all.tid new file mode 100644 index 000000000..27fa88f70 --- /dev/null +++ b/core/templates/save-all.tid @@ -0,0 +1,6 @@ +title: $:/core/save/all + +\define saveTiddlerFilter() +[is[tiddler]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +\end +{{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/save-empty.tid b/core/templates/save-empty.tid new file mode 100644 index 000000000..23c863efb --- /dev/null +++ b/core/templates/save-empty.tid @@ -0,0 +1,6 @@ +title: $:/core/save/empty + +\define saveTiddlerFilter() +[is[system]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +\end +{{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/static.area.tid b/core/templates/static.area.tid new file mode 100644 index 000000000..a7fbdf7bc --- /dev/null +++ b/core/templates/static.area.tid @@ -0,0 +1,8 @@ +title: $:/core/templates/static.area + +<$reveal type="nomatch" state="$:/isEncrypted" text="yes"> +{{$:/core/templates/static.content||$:/core/templates/html-tiddler}} + +<$reveal type="match" state="$:/isEncrypted" text="yes"> +This file contains an encrypted ~TiddlyWiki. Enable ~JavaScript and enter the decryption password when prompted. + diff --git a/core/templates/static.content.tid b/core/templates/static.content.tid index 1936df866..5be6cf953 100644 --- a/core/templates/static.content.tid +++ b/core/templates/static.content.tid @@ -1,12 +1,11 @@ title: $:/core/templates/static.content type: text/vnd.tiddlywiki -<$reveal type="nomatch" state="$:/isEncrypted" text="yes"> -<$list filter="[!is[system]sort[title]]" > -<$view field="title" format="text"> +This [[TiddlyWiki|http://tiddlywiki.com]] contains the following tiddlers: + + diff --git a/core/templates/store.area.template.html.tid b/core/templates/store.area.template.html.tid index ed5359961..fd13620c2 100644 --- a/core/templates/store.area.template.html.tid +++ b/core/templates/store.area.template.html.tid @@ -1,16 +1,13 @@ title: $:/core/templates/store.area.template.html -\define saveFilter() -[is[tiddler]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -\end <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> `` <$reveal type="match" state="$:/isEncrypted" text="yes"> `` `` \ No newline at end of file diff --git a/core/templates/tiddlywiki5.template.html.tid b/core/templates/tiddlywiki5.html.tid similarity index 94% rename from core/templates/tiddlywiki5.template.html.tid rename to core/templates/tiddlywiki5.html.tid index 9ea4cf723..26eb03fa5 100644 --- a/core/templates/tiddlywiki5.template.html.tid +++ b/core/templates/tiddlywiki5.html.tid @@ -1,4 +1,4 @@ -title: $:/core/templates/tiddlywiki5.template.html +title: $:/core/templates/tiddlywiki5.html \rules only filteredtranscludeinline transcludeinline @@ -27,7 +27,7 @@ title: $:/core/templates/tiddlywiki5.template.html diff --git a/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid b/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid index 0edcc371b..fcd549920 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.0alpha16.tid @@ -21,4 +21,8 @@ tags: releasenote * Fixed problem with displaying tiddler titles that contain WikiText syntax +!! Internal changes + +* The main HTML file template used for saving TiddlyWiki5 documents has changed from `$:/core/templates/tiddlywiki5.template.html` to `$:/core/save/all` + Contributors to this release include @jermolene. diff --git a/editions/tw5.com/tiddlers/howtos/How_to_build_a_TiddlyWiki5_from_individual_tiddlers.tid b/editions/tw5.com/tiddlers/howtos/How_to_build_a_TiddlyWiki5_from_individual_tiddlers.tid index 99126164a..0f4fa4f54 100644 --- a/editions/tw5.com/tiddlers/howtos/How_to_build_a_TiddlyWiki5_from_individual_tiddlers.tid +++ b/editions/tw5.com/tiddlers/howtos/How_to_build_a_TiddlyWiki5_from_individual_tiddlers.tid @@ -1,4 +1,4 @@ -created: 201308251606 +created: 201311242206 creator: JeremyRuston modified: 201308251607 modifier: JeremyRuston @@ -12,4 +12,4 @@ title: How to build a TiddlyWiki5 from individual tiddlers ##* Alternatively, just copy the `editions/empty` folder from the TiddlyWiki5 repo # Create individual TiddlerFiles in the `~/MyWiki/tiddlers` directory # Execute the following command from the TiddlyWiki5 root directory to build a TiddlyWiki5 file from the tiddlers: -## `node ./tiddlywiki.js ~/MyWiki --rendertiddler $:/core/templates/tiddlywiki5.template.html index.html text/plain` +## `node ./tiddlywiki.js ~/MyWiki --rendertiddler $:/core/save/all index.html text/plain` diff --git a/editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid index c36930bf9..769f8e7f1 100644 --- a/editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/TestingMechanism.tid @@ -1,4 +1,4 @@ -modified: 201304251659 +modified: 201311222159 tags: dev title: TestingMechanism @@ -28,7 +28,7 @@ To generate a wiki containing the browser tests load up the `test` wiki and save node ./tiddlywiki.js \ ./editions/test \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/test.html text/plain \ ``` Then, open the `test.html` file in the browser to see the test results. There is a prebuilt version of `test.html` at: diff --git a/serve.cmd b/serve.cmd index e50320e61..09f788e1b 100644 --- a/serve.cmd +++ b/serve.cmd @@ -7,5 +7,5 @@ rem Optional parameter is the username for signing edits node .\tiddlywiki.js ^ editions\clientserver ^ --verbose ^ - --server 8080 $:/core/templates/tiddlywiki5.template.html text/plain text/html %1^ + --server 8080 $:/core/save/all text/plain text/html %1^ || exit 1 diff --git a/serve.sh b/serve.sh index e50d2283b..7d84e7e89 100755 --- a/serve.sh +++ b/serve.sh @@ -7,5 +7,5 @@ node ./tiddlywiki.js \ editions/clientserver \ --verbose \ - --server 8080 $:/core/templates/tiddlywiki5.template.html text/plain text/html $1\ + --server 8080 $:/core/save/all text/plain text/html $1\ || exit 1 diff --git a/test.cmd b/test.cmd index 8954d182a..047230684 100644 --- a/test.cmd +++ b/test.cmd @@ -15,5 +15,5 @@ rem Run the test edition to run the node.js tests and to generate test.html for node .\tiddlywiki.js ^ .\editions\test ^ --verbose ^ - --rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\test.html text/plain ^ + --rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\test.html text/plain ^ || exit 1 diff --git a/test.sh b/test.sh index 6ebacafe7..d4336a74b 100755 --- a/test.sh +++ b/test.sh @@ -20,5 +20,5 @@ echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" node ./tiddlywiki.js \ ./editions/test \ --verbose \ - --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/test.html text/plain \ + --rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/test.html text/plain \ || exit 1