From e8e9759816c60b79e05796c4c96da4a2bccfa7c5 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 23 Jun 2016 16:29:51 +0100 Subject: [PATCH] Add more flexible support for static content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Passing the static content through the `$:/core/templates/html-tiddler` template made it impossible to produce output that wasn’t HTML encoded (eg stylesheets). --- core/templates/raw-static-tiddler.tid | 7 +++++++ core/templates/static.area.tid | 1 + 2 files changed, 8 insertions(+) create mode 100644 core/templates/raw-static-tiddler.tid diff --git a/core/templates/raw-static-tiddler.tid b/core/templates/raw-static-tiddler.tid new file mode 100644 index 000000000..0531a391c --- /dev/null +++ b/core/templates/raw-static-tiddler.tid @@ -0,0 +1,7 @@ +title: $:/core/templates/raw-static-tiddler + +<$view field="text" format="plainwikified" /> \ No newline at end of file diff --git a/core/templates/static.area.tid b/core/templates/static.area.tid index a7fbdf7bc..d235ab4ed 100644 --- a/core/templates/static.area.tid +++ b/core/templates/static.area.tid @@ -1,6 +1,7 @@ title: $:/core/templates/static.area <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> +{{{ [all[shadows+tiddlers]tag[$:/tags/RawStaticContent]!has[draft.of]] ||$:/core/templates/raw-static-tiddler}}} {{$:/core/templates/static.content||$:/core/templates/html-tiddler}} <$reveal type="match" state="$:/isEncrypted" text="yes">