#!/bin/sh cd ./public # Build single-page no-JS wiki tiddlywiki \ --load index.html \ --output ./ \ --rendertiddler $:/core/templates/static.template.css Style.css text/plain \ --rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain # Fix errors in the resulting HTML cat << EOF | python3 from bs4 import BeautifulSoup; from re import sub; File = 'Static.html' def Fix1(m): return f'
{m.group(2)}'; Source = str(BeautifulSoup(open(File, 'r'), 'html5lib')); open(File, 'w').write(sub('
(.+)<\/summary>\s*<\/a>', Fix1, Source)); EOF