From b9e80a270b7f67db816e9b06e2f71f9c9dd86c17 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 31 Dec 2013 09:43:46 +0000 Subject: [PATCH] All-in-one static HTML support Added a first pass at generating an all-in-one static HTML representation of a wiki, incorporating anchor links for wiki links --- bld.cmd | 1 + bld.sh | 1 + core/templates/alltiddlers.content.tid | 3 +++ core/templates/alltiddlers.template.html.tid | 26 +++++++++++++++++++ core/templates/static-tiddler.tid | 5 ++++ .../tw5.com/tiddlers/Release 5.0.6beta.tid | 2 ++ editions/tw5.com/tiddlers/howtos/UsingSVG.tid | 2 +- 7 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 core/templates/alltiddlers.content.tid create mode 100644 core/templates/alltiddlers.template.html.tid create mode 100644 core/templates/static-tiddler.tid diff --git a/bld.cmd b/bld.cmd index e3f6a40a6..d890043d6 100644 --- a/bld.cmd +++ b/bld.cmd @@ -42,6 +42,7 @@ node .\tiddlywiki.js ^ --rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.hta text/plain ^ --savetiddler $:/green_favicon.ico %TW5_BUILD_OUTPUT%/static/favicon.ico ^ --rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^ + --rendertiddler $:/core/templates/alltiddlers.template.html %TW5_BUILD_OUTPUT%\alltiddlers.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 ^ || exit 1 diff --git a/bld.sh b/bld.sh index 0185524e9..a8fec129f 100755 --- a/bld.sh +++ b/bld.sh @@ -43,6 +43,7 @@ node ./tiddlywiki.js \ --rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.hta text/plain \ --savetiddler $:/green_favicon.ico $TW5_BUILD_OUTPUT/static/favicon.ico \ --rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \ + --rendertiddler $:/core/templates/alltiddlers.template.html $TW5_BUILD_OUTPUT/alltiddlers.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 \ || exit 1 diff --git a/core/templates/alltiddlers.content.tid b/core/templates/alltiddlers.content.tid new file mode 100644 index 000000000..5ba8693e2 --- /dev/null +++ b/core/templates/alltiddlers.content.tid @@ -0,0 +1,3 @@ +title: $:/core/templates/alltiddlers.content + +{{{ [!is[system]sort[title]] ||$:/core/templates/static-tiddler}}} \ No newline at end of file diff --git a/core/templates/alltiddlers.template.html.tid b/core/templates/alltiddlers.template.html.tid new file mode 100644 index 000000000..13033a0fd --- /dev/null +++ b/core/templates/alltiddlers.template.html.tid @@ -0,0 +1,26 @@ +title: $:/core/templates/alltiddlers.template.html +type: text/vnd.tiddlywiki-html + +\define tw-wikilink-template() #$uri_encoded$ +\rules only filteredtranscludeinline transcludeinline + + + + + + + + +{{$:/core/wiki/title}} +
+{{{ [is[system]type[text/css]] ||$:/core/templates/css-tiddler}}} +
+ + + +{{$:/StaticBanner||$:/core/templates/html-tiddler}} +{{$:/core/templates/alltiddlers.content||$:/core/templates/html-tiddler}} + + diff --git a/core/templates/static-tiddler.tid b/core/templates/static-tiddler.tid new file mode 100644 index 000000000..bf81a3a4a --- /dev/null +++ b/core/templates/static-tiddler.tid @@ -0,0 +1,5 @@ +title: $:/core/templates/static-tiddler + +>> +<$transclude tiddler="$:/core/ui/ViewTemplate"/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/Release 5.0.6beta.tid b/editions/tw5.com/tiddlers/Release 5.0.6beta.tid index 08cfb16d7..aa8da1357 100644 --- a/editions/tw5.com/tiddlers/Release 5.0.6beta.tid +++ b/editions/tw5.com/tiddlers/Release 5.0.6beta.tid @@ -9,6 +9,8 @@ type: text/vnd.tiddlywiki !! Improvements * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/bd7db62da052ec6262c3319eaa11f00e5c452a7b]] support for specifying hostname for the ServerCommand +* Added a first pass at generating an all-in-one static HTML representation of a wiki, complete with internal anchor links for wiki links +** See http://tiddlywiki.com/alltiddlers.html !! Bug Fixes diff --git a/editions/tw5.com/tiddlers/howtos/UsingSVG.tid b/editions/tw5.com/tiddlers/howtos/UsingSVG.tid index 6c00df613..1f5689c9f 100644 --- a/editions/tw5.com/tiddlers/howtos/UsingSVG.tid +++ b/editions/tw5.com/tiddlers/howtos/UsingSVG.tid @@ -39,7 +39,7 @@ You can include simple text strings in SVG images using the `` element: HTML or WikiText content can be included within inline SVG images using the `` element. For example: -Here is some text that requires a word wrap, and includes a [[link to a tiddler|HelloThere]]. +Here is some text that requires a word wrap, and includes a [[link to a tiddler|HelloThere]]. ! Transcluding SVG elements