Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ $ uv add libvcs --prerelease allow
_Notes on the upcoming release will go here._
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

### Bug fixes

- Fix dark-theme flash when light theme is selected — the docs
`conf.py` was overriding gp-sphinx's `setup()` callback, so the
inline FOWT-prevention `<script>` never landed in `<head>`. Chain
the gp-sphinx setup explicitly so the script (and the
`spa-nav.js` / copybutton / MyST-lexer hooks) register correctly
(#527)

### Documentation

- Bump gp-sphinx docs stack to v0.0.1a16 — docs site now renders
Expand Down
13 changes: 12 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
html_extra_path=["manifest.json"],
rediraffe_redirects="redirects.txt",
)

_gp_setup = conf.pop("setup")
globals().update(conf)


Expand Down Expand Up @@ -91,5 +93,14 @@ def _on_missing_class_reference(


def setup(app: Sphinx) -> None:
"""Connect missing-reference handler to resolve py:data as :class: links."""
"""Chain gp-sphinx setup() and connect the missing-reference handler.

``_gp_setup`` is the callback ``gp_sphinx.config.merge_sphinx_config``
returns; it registers the FOWT-prevention head injection,
``spa-nav.js``, the copy-button bridge, the ``remove_tabs_js``
cleanup, and the MyST Pygments lexers. Without this chain those
hooks never register and the docs site flashes the wrong theme
before settling on the user's preference.
"""
_gp_setup(app)
app.connect("missing-reference", _on_missing_class_reference)