Skip to content

Commit c8f3ebb

Browse files
committed
docs: Set html_theme also on rtd
RTD removed the default html theme for builds, making those without `html_theme` set fail. Previously we set the theme only when building locally as rtd would set it for us otherwise. Sets `html_theme` regardless of that, hopefully fixing the builds on rtd. Ref: readthedocs/readthedocs.org#10638 [skip ci]
1 parent a55c382 commit c8f3ebb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
'Miscellaneous'),
7171
]
7272

73+
html_theme = "sphinx_rtd_theme"
74+
7375
# on_rtd is whether we are on readthedocs.org
7476
on_rtd = getenv("READTHEDOCS", None) == "True"
7577
if not on_rtd:
7678
import sphinx_rtd_theme
77-
html_theme = "sphinx_rtd_theme"
7879
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
7980

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

0 commit comments

Comments
 (0)