Skip to content

Commit 92e991d

Browse files
authored
Merge pull request #8322 from jepler/rtd-theme
Unconditionally use sphinx_rtd_theme when building docs
2 parents acc4ee9 + 96a3b88 commit 92e991d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

conf.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,9 @@ def autoapi_prepare_jinja_env(jinja_env):
265265

266266
# -- Options for HTML output ----------------------------------------------
267267

268-
# on_rtd is whether we are on readthedocs.org
269-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
270-
271-
if not on_rtd: # only import and set the theme if we're building docs locally
272-
try:
273-
import sphinx_rtd_theme
274-
html_theme = 'sphinx_rtd_theme'
275-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
276-
except:
277-
html_theme = 'default'
278-
html_theme_path = ['.']
279-
else:
280-
html_theme_path = ['.']
268+
import sphinx_rtd_theme
269+
html_theme = 'sphinx_rtd_theme'
270+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
281271

282272
# Theme options are theme-specific and customize the look and feel of a theme
283273
# further. For a list of options available for each theme, see the

0 commit comments

Comments
 (0)