File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 3
3
sphinx >= 6.0
4
4
jinja2
5
5
# >= is necessary to prevent `uv` from selecting a `Sphinx` version this does not support
6
- sphinx_rtd_theme >= 2
6
+ sphinx_rtd_theme >= 3
7
7
sphinxcontrib-jquery
8
8
sphinxcontrib-trio
9
9
towncrier
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ sphinx-codeautolink==0.15.2
79
79
# via -r docs-requirements.in
80
80
sphinx-hoverxref==1.4.1
81
81
# via -r docs-requirements.in
82
- sphinx-rtd-theme==2 .0.0
82
+ sphinx-rtd-theme==3 .0.0
83
83
# via -r docs-requirements.in
84
84
sphinxcontrib-applehelp==2.0.0
85
85
# via sphinx
Original file line number Diff line number Diff line change @@ -201,6 +201,13 @@ def setup(app: Sphinx) -> None:
201
201
app .connect ("source-read" , on_read_source )
202
202
203
203
204
+ # Our docs use the READTHEDOCS variable, so copied from:
205
+ # https://about.readthedocs.com/blog/2024/07/addons-by-default/
206
+ if os .environ .get ("READTHEDOCS" , "" ) == "True" :
207
+ if "html_context" not in globals ():
208
+ html_context = {}
209
+ html_context ["READTHEDOCS" ] = True
210
+
204
211
# -- General configuration ------------------------------------------------
205
212
206
213
# If your documentation needs a minimal Sphinx version, state it here.
@@ -374,10 +381,7 @@ def add_mapping(
374
381
# We have to set this ourselves, not only because it's useful for local
375
382
# testing, but also because if we don't then RTD will throw away our
376
383
# html_theme_options.
377
- import sphinx_rtd_theme
378
-
379
384
html_theme = "sphinx_rtd_theme"
380
- html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
381
385
382
386
# Theme options are theme-specific and customize the look and feel of a theme
383
387
# further. For a list of options available for each theme, see the
You can’t perform that action at this time.
0 commit comments