Skip to content

Commit

Permalink
Add tv-config-static variable for indicating static rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Jun 17, 2023
1 parent 5bef6d5 commit 190613a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/templates/exporters/StaticRiver.tid
Expand Up @@ -3,6 +3,7 @@ tags: $:/tags/Exporter
description: {{$:/language/Exporters/StaticRiver}}
extension: .html

\define tv-config-static() yes
\define tv-wikilink-template() #$uri_encoded$
\define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no
Expand Down
1 change: 1 addition & 0 deletions core/templates/server/static.tiddler.html.tid
@@ -1,6 +1,7 @@
title: $:/core/templates/server/static.tiddler.html

\whitespace trim
\define tv-config-static() yes
\define tv-wikilink-template() $uri_encoded$
\import [subfilter{$:/core/config/GlobalImportFilter}]
<html>
Expand Down
1 change: 1 addition & 0 deletions core/templates/static.template.html.tid
@@ -1,6 +1,7 @@
title: $:/core/templates/static.template.html
type: text/vnd.tiddlywiki-html

\define tv-config-static() yes
\define tv-wikilink-template() static/$uri_doubleencoded$.html
\define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no
Expand Down
1 change: 1 addition & 0 deletions core/templates/static.tiddler.html.tid
@@ -1,6 +1,7 @@
title: $:/core/templates/static.tiddler.html

\define tv-wikilink-template() $uri_doubleencoded$.html
\define tv-config-static() yes
\define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no
\define tv-config-toolbar-class() tc-btn-invisible
Expand Down
10 changes: 10 additions & 0 deletions editions/tw5.com/tiddlers/variables/tv-config-static Variable.tid
@@ -0,0 +1,10 @@
created: 20230617085524754
modified: 20230617085524754
title: tv-config-static Variable
tags: Variables [[Core Variables]] [[Configuration Variables]]
type: text/vnd.tiddlywiki
caption: tv-config-static

<<.from-version "5.3.0">> The <<.def tv-config-static>> [[variable|Variables]] is set to `yes` within static rendering templates, and is unset in other contexts.

It is useful for selectively hiding or showing content depending on whether a rendering is static or interactive.

0 comments on commit 190613a

Please sign in to comment.