feat(11.1-02): add the documentation theme, chroma highlighting and docs:serve
- WinterCMS-style shell: header with search and theme toggle, grouped sidebar, on-page TOC, pager, page actions, callouts, heading permalinks, footer and a 404 page - fenced code highlighted at build time by chroma/v2 into tok-* classes, with a copy button; no inline script, style or handler - vendored DM Sans/DM Mono fonts and Lucide icons with their licences - client-side search over search-index.json built with textContent only - summer docs:serve builds into a temp dir, serves on loopback by default, returns 404.html with status 404 and rebuilds on change
This commit is contained in:
@@ -83,6 +83,15 @@ run_deps() {
|
||||
*) refuse "go.mod added $dep, which no phase decision approves" ;;
|
||||
esac
|
||||
done
|
||||
# D-15: chroma/v2 highlights code at build time, as a direct requirement.
|
||||
(cd "$ROOT" && go mod edit -json) | python3 -c '
|
||||
import json, sys
|
||||
direct = [r for r in json.load(sys.stdin).get("Require") or [] if r["Path"] == "github.com/alecthomas/chroma/v2" and not r.get("Indirect")]
|
||||
sys.exit(0 if direct else 1)
|
||||
' || refuse "go.mod does not require github.com/alecthomas/chroma/v2 directly"
|
||||
if grep -q 'goldmark-highlighting' "$ROOT/go.mod"; then
|
||||
refuse "go.mod requires goldmark-highlighting (D-15 rejects it)"
|
||||
fi
|
||||
echo "phase11.1 deps passed"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user