diff --git a/core/templates/external-js/save-all-external-js.tid b/core/templates/external-js/save-all-external-js.tid index 2616fed20..193b6e90c 100644 --- a/core/templates/external-js/save-all-external-js.tid +++ b/core/templates/external-js/save-all-external-js.tid @@ -5,7 +5,10 @@ title: $:/core/save/all-external-js \define saveTiddlerFilter() [is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end + + \define defaultCoreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js + <$let coreURL={{{ [[coreURL]is[variable]thenelse] }}}> {{$:/core/templates/tiddlywiki5-external-js.html}} diff --git a/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid b/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid new file mode 100644 index 000000000..a1f1a0a27 --- /dev/null +++ b/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid @@ -0,0 +1,7 @@ +created: 20230314153132081 +modified: 20230314153243008 +title: $:/DefaultTiddlers +type: text/vnd.tiddlywiki + +GettingStarted +[[Using the external JavaScript template]] diff --git a/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid b/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid new file mode 100644 index 000000000..071c85fe9 --- /dev/null +++ b/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid @@ -0,0 +1,4 @@ +title: $:/config/SaveWikiButton/Filename +type: text/vnd.tiddlywiki + +external-<>.html \ No newline at end of file diff --git a/editions/server-external-js/tiddlers/external/tiddlywiki.files b/editions/server-external-js/tiddlers/external/tiddlywiki.files new file mode 100644 index 000000000..73474d2ce --- /dev/null +++ b/editions/server-external-js/tiddlers/external/tiddlywiki.files @@ -0,0 +1,8 @@ +{ + "tiddlers": [ + { + "file": "../../../tw5.com/tiddlers/webserver/Using the external JavaScript template.tid", + "isTiddlerFile": true + } + ] +} \ No newline at end of file diff --git a/editions/server-external-js/tiddlywiki.info b/editions/server-external-js/tiddlywiki.info index b8d4c37ee..cb02accd5 100644 --- a/editions/server-external-js/tiddlywiki.info +++ b/editions/server-external-js/tiddlywiki.info @@ -2,8 +2,7 @@ "description": "Client-server edition with external tiddlywiki.js", "plugins": [ "tiddlywiki/tiddlyweb", - "tiddlywiki/filesystem", - "tiddlywiki/highlight" + "tiddlywiki/filesystem" ], "themes": [ "tiddlywiki/vanilla", @@ -13,7 +12,7 @@ "listen": [ "--listen","root-tiddler=$:/core/save/all-external-js","use-browser-cache=yes"], "index": [ - "--render","$:/core/save/offline-external-js","index.html","text/plain", + "--render","$:/core/save/offline-external-js","[[external-]addsuffixaddsuffix[.html]]","text/plain", "--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffixaddsuffix[.js]]","text/plain"], "static": [ "--render","$:/core/templates/static.template.html","static.html","text/plain", diff --git a/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid b/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid index 1aa61e86a..75b5f1484 100644 --- a/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid +++ b/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid @@ -1,9 +1,13 @@ created: 20180905075846391 -modified: 20221207112242775 +modified: 20230319130830880 tags: [[WebServer Guides]] title: Using the external JavaScript template type: text/vnd.tiddlywiki + + You can use a special template to externalise ~TiddlyWiki's core code into a separate file. This configuration allows the browser to cache the core for improved efficiency. ! Background @@ -60,7 +64,7 @@ The "server-external-js" edition lets you save the snapshot from the command lin tiddlywiki YOUR_WIKI_FOLDER --build index ``` -The files `index.html` and `tiddlywikicore-5.x.x.js` will be saved in your wiki folder's `output` directory. +The files `external-5-x-x.html` and `tiddlywikicore-5.x.x.js` will be saved in your wiki folder's `output` directory. !! Obtaining the ~TiddlyWiki core in the browser