Skip to content

Commit

Permalink
add archive HTML wikis, add index.html + css (TiddlyWiki#7776)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
pmario authored and munnox committed Dec 24, 2023
1 parent 04cca87 commit b8c79c3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js"
TW5_BUILD_MAIN_EDITION: "./editions/tw5.com"
TW5_BUILD_OUTPUT: "./output"
TW5_BUILD_ARCHIVE: "./output"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down
20 changes: 19 additions & 1 deletion bin/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,35 @@ 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
# /favicon.ico Favicon for main site
# /static.html Static rendering of default tiddlers
# /alltiddlers.html Static rendering of all tiddlers
# /static/* Static single tiddlers
# /static/static.css Static stylesheet
# /static/favicon.ico Favicon for static pages

node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--verbose \
Expand Down
7 changes: 6 additions & 1 deletion editions/tw5.com/tiddlywiki.info
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
"external-js": [
"--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": {
"retain-original-tiddler-path": true
Expand Down

0 comments on commit b8c79c3

Please sign in to comment.