Improve performance on poor connections: local assets, gzip, caching
- Replace Tailwind CDN (~350KB) with purged local CSS (~22KB) - Replace htmx unpkg CDN with local static file - Add Gzip middleware (standard library, sync.Pool) for all responses - Add Cache-Control: public, max-age=3600 for /static/* assets - Reduce status polling interval from 5s to 30s - Add scripts/build-css.sh for CSS regeneration after template changes - Document in bible-local/operations.md and history.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
8
scripts/build-css.sh
Executable file
8
scripts/build-css.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Regenerates web/static/tailwind.min.css from templates.
|
||||
# Run this after editing HTML templates that add new Tailwind classes.
|
||||
# Requires: npm install (node_modules/tailwindcss must be present)
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
node_modules/.bin/tailwindcss -i tw-input.css -o web/static/tailwind.min.css --minify
|
||||
echo "Done: $(wc -c < web/static/tailwind.min.css | tr -d ' ') bytes"
|
||||
Reference in New Issue
Block a user