mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-03-23 13:31:14 +08:00
Two fixes:
1. version-selector.js: Simplify basePath() to determine site root from
the URL prefix (/ or /docs/) instead of trying to strip path segments.
Previously, visiting /index.html caused basePath to compute
/index.html/v1/ (404) because it didn't strip the filename first.
2. prepare_mdbook.py: Strip pandoc-style heading IDs ({#label}) from
both extracted titles (used in SUMMARY.md sidebar) and rendered
markdown content. Fixes "Model Deployment {#ch:deploy}" showing
raw in the sidebar and page headings.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>