#!/usr/bin/env bash # Regenerate static/architecture.html from Bookly.lit.md. # # The .lit.md is the single source of truth: edit it, then run this script # to rebuild the HTML that /architecture serves. The post-edit reverse-sync # hook keeps the .lit.md in step with direct edits to the Python files, but # it does not re-run pandoc -- this script does. set -euo pipefail cd "$(dirname "$0")/.." pandoc Bookly.lit.md \ -o static/architecture.html \ --standalone \ --embed-resources \ --filter mermaid-filter \ --toc \ --toc-depth=3 \ --highlight-style=tango \ -H scripts/architecture-header.html \ --metadata pagetitle="Bookly" echo "wrote static/architecture.html ($(wc -c < static/architecture.html) bytes)"