1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

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
This commit is contained in:
Jermolene 2013-12-31 09:43:46 +00:00
parent 44568dc6ef
commit b9e80a270b
7 changed files with 39 additions and 1 deletions

View File

@ -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

1
bld.sh
View File

@ -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

View File

@ -0,0 +1,3 @@
title: $:/core/templates/alltiddlers.content
{{{ [!is[system]sort[title]] ||$:/core/templates/static-tiddler}}}

View File

@ -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
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="TiddlyWiki" />
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
<meta name="format-detection" content="telephone=no">
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
<title>{{$:/core/wiki/title}}</title>
<div id="styleArea">
{{{ [is[system]type[text/css]] ||$:/core/templates/css-tiddler}}}
</div>
<style type="text/css">
{{{ [tag[$:/tags/stylesheet]] [is[shadow]tag[$:/tags/stylesheet]] ||$:/core/templates/wikified-tiddler}}}
</style>
</head>
<body class="tw-body">
{{$:/StaticBanner||$:/core/templates/html-tiddler}}
{{$:/core/templates/alltiddlers.content||$:/core/templates/html-tiddler}}
</body>
</html>

View File

@ -0,0 +1,5 @@
title: $:/core/templates/static-tiddler
<a name=<<currentTiddler>>>
<$transclude tiddler="$:/core/ui/ViewTemplate"/>
</a>

View File

@ -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

View File

@ -39,7 +39,7 @@ You can include simple text strings in SVG images using the `<text>` element:
HTML or WikiText content can be included within inline SVG images using the `<foreignObject>` element. For example:
<svg width="260px" height="260px"><circle cx="150" cy="150" r="100" fill="blue" stoke="red"/><foreignObject x="70" y="110" width="150" height="180"><body style="background:#dec;">Here is some text that requires a word wrap, and includes a [[link to a tiddler|HelloThere]].</body></foreignObject></svg>
<svg width="260px" height="260px"><circle cx="150" cy="150" r="100" fill="blue" stoke="red"/><foreignObject x="70" y="110" width="150" height="180"><body>Here is some text that requires a word wrap, and includes a [[link to a tiddler|HelloThere]].</body></foreignObject></svg>
! Transcluding SVG elements