fix(docs): correct SVG diagram links and restore sidebar version string#1082
Merged
Conversation
Two independent regressions in the published API docs:
1. Broken links inside the class-diagram SVGs. The graph link template was
`.../api/{module}.html`, and bo4e-cli's `{module}` placeholder expands to
the schema-derived path (`com.Angebotsteil`), producing
`api/com.Angebotsteil.html` -- a 404. Sphinx groups modules into
per-package pages, so the correct target is
`api/bo4e.com.html#bo4e.com.angebotsteil.Angebotsteil`. Rebuild the
template as `api/bo4e.{pkg}.html#bo4e.{pkg}.{class.lower}.{class}` using
the new `{class.lower}` accessor (bo4e-cli >= v1.2.4), and bump the
setup-bo4e pin accordingly.
2. Missing version string in the sidebar. sphinx-rtd-theme 3.1.0 dropped the
always-on `<div class="version">` (now shown only via the Read the Docs
flyout), so on GitHub Pages the version vanished. Restore it with a
`docs/_templates/layout.html` override of the theme's `sidebartitle` block.
`version` itself was already set correctly in conf.py.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…inks
Switch the graph link template to bo4e-cli's new `{namespace}` placeholder and
the Sphinx module anchor:
…/api/{namespace}.html#module-{namespace}.{class.lower}
`{namespace}` is `bo4e` + the module's parent package, so one template resolves
both nested classes (`bo4e.bo.html#module-bo4e.bo.angebot`) and root-level ones
(`bo4e.html#module-bo4e.zusatzattribut`). The previous `bo4e.{pkg}.…` form
mis-linked the root-level ZusatzAttribut schema (its `{pkg}` is the class name,
not a package). All targets verified 200-with-anchor on the live docs.
Requires bo4e-cli >= v1.2.4 (already the setup-bo4e pin).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two independent regressions in the published API docs.
1. Broken links inside the class-diagram SVGs
The graph link template was
.../api/{module}.html. bo4e-cli's{module}placeholder expands to the schema-derived path (
com.Angebotsteil), producingapi/com.Angebotsteil.html— a 404. Sphinx groups modules into per-packagepages, so the real target is
api/bo4e.com.html#bo4e.com.angebotsteil.Angebotsteil.The template is rebuilt as:
using the new
{class.lower}accessor (see the CLI PR below). Verified: therendered SVG hrefs return 200 with the anchor present on the live docs.
2. Missing version string in the sidebar
Not a version-setting bug —
version/releaseare still correct (the pagetitle shows the version). The
sphinx-rtd-theme3.0.2 → 3.1.0 bump (#1069)removed the always-on
<div class="version">, showing it only via the Read theDocs flyout (
READTHEDOCS or DEBUG). On GitHub Pages that gate is never true.Restored with a
docs/_templates/layout.htmloverride of the theme'ssidebartitleblock (templates_pathwas already configured). Verified with anisolated Sphinx build rendering
<div class="version">…</div>.The
setup-bo4epin is bumped to v1.2.4, which must carry the{class.lower}accessor from bo4e/BO4E-CLI#196. That CLI release has to shipfirst; until then this branch's docs CI cannot download the pinned binary. Adjust
the pin if the actual CLI release tag differs.
🤖 Generated with Claude Code