From 8a47eb2d03f10f0a990a76e3b459e832c19895c7 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Mon, 7 Oct 2024 18:22:06 +0800 Subject: [PATCH] [DOCS] Update commands in "Generating Static Sites with TiddlyWiki" to use render command (#8666) * Update commands in "Generating Static Sites with TiddlyWiki" to use render command & add deprecated tag to some command * Remove timestamp in deprecated commands --- .../tiddlers/commands/RenderTiddlerCommand.tid | 5 +++-- .../tiddlers/commands/RenderTiddlersCommand.tid | 5 +++-- .../tiddlers/commands/SaveTiddlerCommand.tid | 8 ++++---- .../tiddlers/commands/SaveTiddlersCommand.tid | 8 ++++---- .../Generating Static Sites with TiddlyWiki.tid | 14 +++++++------- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid b/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid index ede970536..404a80b6a 100644 --- a/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid +++ b/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid @@ -1,6 +1,7 @@ -title: RenderTiddlerCommand -tags: Commands caption: rendertiddler +tags: Commands $:/deprecated +title: RenderTiddlerCommand +type: text/vnd.tiddlywiki <<.deprecated-since "5.1.15" "RenderCommand">>. diff --git a/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid b/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid index 6d4282fb2..88ad91eca 100644 --- a/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid +++ b/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid @@ -1,6 +1,7 @@ -title: RenderTiddlersCommand -tags: Commands caption: rendertiddlers +tags: Commands $:/deprecated +title: RenderTiddlersCommand +type: text/vnd.tiddlywiki <<.deprecated-since "5.1.15" "RenderCommand">>. diff --git a/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid b/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid index f51799163..1b9bacddb 100644 --- a/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid +++ b/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid @@ -1,8 +1,8 @@ -title: SaveTiddlerCommand -tags: Commands -created: 20131218121606089 -modified: 20131218121606089 caption: savetiddler +created: 20131218121606089 +tags: Commands $:/deprecated +title: SaveTiddlerCommand +type: text/vnd.tiddlywiki <<.deprecated-since "5.1.15" "SaveCommand">>. diff --git a/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid b/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid index c167cd4a3..4b41dee52 100644 --- a/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid +++ b/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid @@ -1,8 +1,8 @@ -title: SaveTiddlersCommand -tags: Commands -created: 20140609121606089 -modified: 20140609121606089 caption: savetiddlers +created: 20140609121606089 +tags: Commands $:/deprecated +title: SaveTiddlersCommand +type: text/vnd.tiddlywiki <<.deprecated-since "5.1.15" "SaveCommand">>. diff --git a/editions/tw5.com/tiddlers/howtos/Generating Static Sites with TiddlyWiki.tid b/editions/tw5.com/tiddlers/howtos/Generating Static Sites with TiddlyWiki.tid index ce1061431..104fa7e49 100644 --- a/editions/tw5.com/tiddlers/howtos/Generating Static Sites with TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/howtos/Generating Static Sites with TiddlyWiki.tid @@ -1,5 +1,5 @@ created: 20130828190200000 -modified: 20200421003440463 +modified: 20241007003103647 tags: [[TiddlyWiki on Node.js]] title: Generating Static Sites with TiddlyWiki type: text/vnd.tiddlywiki @@ -16,13 +16,13 @@ You can explore a static representation of the main TiddlyWiki site at https://t The following commands are used to generate the sample static version of the TiddlyWiki5 site: -``` -tiddlywiki wikipath --rendertiddlers '[!is[system]]' $:/core/templates/static.tiddler.html static text/plain -tiddlywiki wikipath --rendertiddler $:/core/templates/static.template.html static.html text/plain -tiddlywiki wikipath --rendertiddler $:/core/templates/static.template.css static/static.css text/plain +```sh +tiddlywiki wikipath --render '[!is[system]]' '[encodeuricomponent[]addprefix[static/]]' text/plain $:/core/templates/static.tiddler.html +tiddlywiki wikipath --render $:/core/templates/static.template.html static.html text/plain +tiddlywiki wikipath --render $:/core/templates/static.template.css static/static.css text/plain ``` -The first RenderTiddlersCommand generates the HTML representations of individual tiddlers, the second RenderTiddlerCommand saves the static version of the DefaultTiddlers, and the final RenderTiddlerCommand saves the stylesheet. (All the files are placed in the `output` folder of the wiki folder). +The first RenderCommand generates the HTML representations of individual tiddlers, `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`. The second RenderCommand saves the static version of the DefaultTiddlers, and the final RenderCommand saves the stylesheet. (All the files are placed in the `output` folder of the wiki folder). ! Wiki Snapshot with Internal Links @@ -33,5 +33,5 @@ For example: https://tiddlywiki.com/alltiddlers.html The example is built by the following commands: ``` ---rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain +--render $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain ```