File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1414
1515import sys
1616import os
17- import sphinx_rtd_theme
17+
18+ # on_rtd is whether we are on readthedocs.org, this line of code grabbed
19+ # from docs.readthedocs.org
20+ on_rtd = os .environ .get ('READTHEDOCS' , None ) == 'True'
21+
22+ if not on_rtd : # only import and set the theme if we're building docs locally
23+ import sphinx_rtd_theme
24+ html_theme = 'sphinx_rtd_theme'
25+ html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
26+
27+ # otherwise, readthedocs.org uses their theme by default, so no need to
28+ # specify it
1829
1930sys .path = [os .path .abspath (".." )] + sys .path
2031from stdlib_list import __version__
105116
106117# The theme to use for HTML and HTML Help pages. See the documentation for
107118# a list of builtin themes.
108- html_theme = "sphinx_rtd_theme"
109-
110- html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
119+ # html_theme = "default"
111120
112121# Theme options are theme-specific and customize the look and feel of a theme
113122# further. For a list of options available for each theme, see the
You can’t perform that action at this time.
0 commit comments