mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
Use external stylesheet in static representation
This commit is contained in:
parent
dc3190d44e
commit
4ab4b1b8bf
1
bld.sh
1
bld.sh
@ -34,6 +34,7 @@ node ./tiddlywiki.js \
|
||||
--savetiddler ReadMe ./readme.md text/html \
|
||||
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \
|
||||
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
||||
|| exit 1
|
||||
|
||||
|
4
core/templates/static.template.css.tid
Normal file
4
core/templates/static.template.css.tid
Normal file
@ -0,0 +1,4 @@
|
||||
title: $:/core/templates/static.template.css
|
||||
|
||||
{{{ [is[shadow]type[text/css]] ||$:/core/templates/css-tiddler}}}
|
||||
{{$:/core/styles/base}}
|
@ -8,13 +8,8 @@ title: $:/core/templates/static.tiddler.html
|
||||
<meta name="tiddlywiki-version" content="`{{$:/core/templates/version}}`" />
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="copyright" content="`{{$:/core/copyright.txt}}`" />
|
||||
<link rel="stylesheet" href="static.css">
|
||||
<title>`{{$:/core/wiki/title}}`</title>
|
||||
<div id="styleArea">
|
||||
`{{{ [is[shadow]type[text/css]] ||$:/core/templates/css-tiddler}}}`
|
||||
</div>
|
||||
<style type="text/css">
|
||||
`{{$:/core/styles/base}}`
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<section class="story-river">
|
||||
|
@ -5,12 +5,13 @@ TiddlyWiki5 can be used to generate a static HTML representation of a TiddlyWiki
|
||||
|
||||
! Example
|
||||
|
||||
You can explore a static representation of the TiddlyWiki5 site at <a href="static.html">static.html</a>. That file is a static representation of the current DefaultTiddlers. Any tiddlers that it links to are referred to via URLs of the form `/static/HelloThere.html` that point to HTML representations of individual tiddlers.
|
||||
You can explore a static representation of the TiddlyWiki5 site at <a href="static.html">static.html</a>. That file is a static representation of the current DefaultTiddlers. Any tiddlers that it links to are referred to via URLs of the form `/static/HelloThere.html` that point to HTML representations of individual tiddlers. The tiddler HTML files reference a `static.css` stylesheet file.
|
||||
|
||||
The included `bld.sh` script includes these commands that are involved in generating the sample static version of the TiddlyWiki5 site:
|
||||
|
||||
```
|
||||
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
||||
```
|
||||
The SaveTiddlerCommand saves the static version of the DefaulTiddlers and the SaveTiddlersCommand generates the HTML representations of individual tiddlers.
|
||||
The first SaveTiddlerCommand saves the static version of the DefaulTiddlers, the second saves the stylesheet, and the final SaveTiddlersCommand generates the HTML representations of individual tiddlers.
|
||||
|
Loading…
Reference in New Issue
Block a user