1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 12:59:56 +00:00

add archive HTML wikis, add index.html + css (#7776)

* add archive HTML wikis, add index.html + css

* only build archive for release version

* tested and add more docs

* fix indent

* fix spacing

* add $TW5_BUILD_OUTPUT_ARCHIVE env variable for testing

* use $TW5_BUILD_OUTPUT_ARCHIVE to check if archive should be built

* use TW5_BUILD_ARCHIVE as requested
This commit is contained in:
Mario Pietsch 2023-11-21 12:42:17 +01:00 committed by GitHub
parent a4850ba3d9
commit 37c625384a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

View File

@ -60,6 +60,7 @@ jobs:
TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js" TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js"
TW5_BUILD_MAIN_EDITION: "./editions/tw5.com" TW5_BUILD_MAIN_EDITION: "./editions/tw5.com"
TW5_BUILD_OUTPUT: "./output" TW5_BUILD_OUTPUT: "./output"
TW5_BUILD_ARCHIVE: "./output"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1

View File

@ -84,10 +84,27 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
###################################################### ######################################################
# #
# Core distribution # Core distributions
# #
###################################################### ######################################################
# Conditionally build archive if $TW5_BUILD_ARCHIVE variable is set, otherwise do nothing
#
# /archive/Empty-TiddlyWiki-<version>.html Empty archived version
# /archive/TiddlyWiki-<version>.html Full archived version
if [ -n "$TW5_BUILD_ARCHIVE" ]; then
node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--verbose \
--version \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_ARCHIVE \
--build archive \
|| exit 1
fi
# /index.html Main site # /index.html Main site
# /favicon.ico Favicon for main site # /favicon.ico Favicon for main site
# /static.html Static rendering of default tiddlers # /static.html Static rendering of default tiddlers
@ -95,6 +112,7 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
# /static/* Static single tiddlers # /static/* Static single tiddlers
# /static/static.css Static stylesheet # /static/static.css Static stylesheet
# /static/favicon.ico Favicon for static pages # /static/favicon.ico Favicon for static pages
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \ $TW5_BUILD_MAIN_EDITION \
--verbose \ --verbose \

View File

@ -54,7 +54,12 @@
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"], "--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
"external-js": [ "external-js": [
"--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain", "--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain",
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"] "--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"],
"archive":[
"--render","$:/core/save/all","[[archive/TiddlyWiki-]addsuffix<version>addsuffix[.html]]","text/plain",
"--render","$:/editions/tw5.com/download-empty","[[archive/Empty-TiddlyWiki-]addsuffix<version>addsuffix[.html]]","text/plain",
"--render","[[TiddlyWiki Archive]]","archive/index.html","text/plain","$:/core/templates/static.tiddler.html",
"--render","$:/core/templates/static.template.css","archive/static.css","text/plain"]
}, },
"config": { "config": {
"retain-original-tiddler-path": true "retain-original-tiddler-path": true