Commit ec2e0b2
committed
fix(docs[conf]) chain gp-sphinx setup() to restore FOWT prevention
why: docs/conf.py defined `def setup(app)` AFTER
`globals().update(conf)`, which silently shadowed the `setup`
callback `gp_sphinx.config.merge_sphinx_config()` returns. With
gp-sphinx's setup never running, the inline `<script
data-cfasync="false">` that gates body paint until `data-theme` is
set was never injected — causing the dark→light flicker visible at
load time. Mirrors the pop+chain pattern at vcspull/docs/conf.py.
what:
- pop `conf["setup"]` into `_gp_setup` before `globals().update(conf)`
- call `_gp_setup(app)` as the first statement of the user's
`setup(app)` so gp-sphinx's hooks register first
side effects (all previously silently disabled, now restored):
- `js/spa-nav.js` SPA-navigation script
- GP_SPHINX_COPYBUTTON_SELECTOR bridge for sphinx-copybutton
- `remove_tabs_js` build-finished cleanup
- `myst` / `myst-md` Pygments lexers1 parent ccde355 commit ec2e0b2
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
95 | 106 | | |
0 commit comments