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 14
14
15
15
import sys
16
16
import 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
18
29
19
30
sys .path = [os .path .abspath (".." )] + sys .path
20
31
from stdlib_list import __version__
105
116
106
117
# The theme to use for HTML and HTML Help pages. See the documentation for
107
118
# 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"
111
120
112
121
# Theme options are theme-specific and customize the look and feel of a theme
113
122
# further. For a list of options available for each theme, see the
You can’t perform that action at this time.
0 commit comments