Skip to content

Commit

Permalink
docs: Set html_theme on rtd builds
Browse files Browse the repository at this point in the history
Sets `html_theme` when building on rtd since the default theme was
recently removed from the build infrastructure and builds now fail
without `html_theme` set.

Ref: readthedocs/readthedocs.org#10638

[skip ci]
  • Loading branch information
st-bender committed Sep 14, 2023
1 parent cb3cd28 commit 503dd33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
'Miscellaneous'),
]

html_theme = "sphinx_rtd_theme"

# on_rtd is whether we are on readthedocs.org
on_rtd = getenv("READTHEDOCS", None) == "True"
if not on_rtd:
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
Expand Down

0 comments on commit 503dd33

Please sign in to comment.