← All docs changelog/2026-05-09.md

May 9, 2026

Commits

cb6674a — static-site: expose internal docs/ + IMPROVE.md at /docs/*

Surfaces the repo's docs/ corpus (architecture, services, 25 changelog files) and IMPROVE.md tracker through the existing static-site Modal app at /docs/*, alongside /demos/* and /posts/*. Runtime markdown rendering using markdown-it-py 3.0.0 (already in grizzlebearImage) — sources stay as the single source of truth, no build-time HTML generation.

Mount points in core.py: add_local_dir("../docs") + add_local_file("../IMPROVE.md"). URL shape is hierarchical: /docs/architecture, /docs/services, /docs/changelog/2026-W19, /docs/improve.

Auth: login-required (not in publicPrefixes allowlist), matching admin-only intent since docs include architecture and IMPROVE's security findings.

New module dev/static_site/docs.py mirrors the blog's content.py shape but is tuned for docs: no YAML frontmatter, title from first # H1 line, recursive walk preserving nested rel_paths, _safe_doc_path() rejecting path-traversal attempts.

Also disables FastAPI's built-in Swagger UI (/docs route) which was shadowing the new docs route — this static-site has no public API surface needing auto-generated docs.

Added:

  • dev/static_site/docs.py — docs corpus loader with path-traversal protection (158 lines)
  • dev/static_site/templates/docs_index.html — docs index page with eyebrow + spark-text headline (42 lines)
  • dev/static_site/templates/_doc_layout.html — doc detail layout re-using post prose styles (39 lines)

Changed:

  • dev/core/core.py — mount docs/ and IMPROVE.md onto Modal image (+6)
  • dev/static_site/endpoint.py/docs routes, disable Swagger UI, Docs nav link (+46/-1)
  • dev/static_site/templates/_fullscreen_header.html — add Docs nav link
  • dev/static_site/templates/_header.html — add Docs nav link
  • dev/static_site/templates/index.html — add "Browse all docs" card