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

Add support for serving TW5 with lazily loaded images

This commit is contained in:
Jermolene 2014-01-29 09:05:00 +00:00
parent 02ba92c6b5
commit fa59382215
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,6 @@
title: $:/core/save/lazy-images
\define saveTiddlerFilter()
[is[tiddler]] -[type[text/css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]]
\end
{{$:/core/templates/tiddlywiki5.html}}

11
lazy.cmd Normal file
View File

@ -0,0 +1,11 @@
@echo off
rem serve TiddlyWiki5 over HTTP with lazily loaded images
rem Optional parameter is the username for signing edits
node .\tiddlywiki.js ^
editions\clientserver ^
--verbose ^
--server 8080 $:/core/save/lazy-images text/plain text/html %1 %2^
|| exit 1

11
lazy.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# serve TiddlyWiki5 over HTTP with lazily loaded images
# Optional parameter is the username for signing edits
node ./tiddlywiki.js \
editions/clientserver \
--verbose \
--server 8080 $:/core/save/lazy-images text/plain text/html $1 $2\
|| exit 1