mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Add a lazy loading template for all non-system tiddlers
With this new template you can run TiddlyWiki under Node.js such that all non-system tiddlers are lazily loaded, and not baked into the HTML file.
This commit is contained in:
parent
d0ca776edb
commit
bc0cbf9070
6
core/templates/save-lazy-all.tid
Normal file
6
core/templates/save-lazy-all.tid
Normal file
@ -0,0 +1,6 @@
|
||||
title: $:/core/save/lazy-all
|
||||
|
||||
\define saveTiddlerFilter()
|
||||
[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
|
||||
\end
|
||||
{{$:/core/templates/tiddlywiki5.html}}
|
@ -1,5 +1,5 @@
|
||||
created: 20140206214608586
|
||||
modified: 20140912141710950
|
||||
modified: 20151105122712982
|
||||
tags: Features
|
||||
title: LazyLoading
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -8,14 +8,22 @@ Ordinarily with TiddlyWiki, the full content of all tiddlers is embedded into th
|
||||
|
||||
Lazy loading can be used in two configurations:
|
||||
|
||||
* When running [[TiddlyWiki on Node.js]], image tiddlers can be subject to lazy loading
|
||||
* When running [[TiddlyWiki on Node.js]], just image tiddlers or all non-system tiddlers can be subject to lazy loading
|
||||
* When running [[TiddlyWiki in the Sky for TiddlyWeb]], all tiddlers are subject to lazy loading
|
||||
|
||||
See the LazyLoadingMechanism for details of how lazy loading is implemented.
|
||||
|
||||
! Lazy loading under Node.js
|
||||
|
||||
To run TiddlyWiki with lazy loading for images, use this alternative ServerCommand to start the server:
|
||||
To start TiddlyWiki with lazy loading for image tiddlers use this command:
|
||||
|
||||
|
||||
```
|
||||
tiddlywiki --server 8080 $:/core/save/lazy-images
|
||||
```
|
||||
|
||||
To apply lazy loading to all non-system tiddlers use this command:
|
||||
|
||||
|
||||
```
|
||||
tiddlywiki --server 8080 $:/core/save/lazy-images
|
||||
|
Loading…
Reference in New Issue
Block a user