File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 15
15
import re
16
16
import sys
17
17
18
+ import sphinx_rtd_theme
19
+
18
20
HERE = os .path .abspath (os .path .dirname (__file__ ))
19
21
20
22
@@ -122,13 +124,15 @@ def find_version(*file_paths):
122
124
123
125
# The theme to use for HTML and HTML Help pages. See the documentation for
124
126
# a list of builtin themes.
125
- on_rtd = os .environ .get ("READTHEDOCS" , None ) == "True"
127
+ if os .environ .get ("READTHEDOCS" , None ) == "True" :
128
+ html_baseurl = os .environ .get ("READTHEDOCS_CANONICAL_URL" , "" )
126
129
127
- if not on_rtd : # only import and set the theme if we're building docs locally
128
- import sphinx_rtd_theme
130
+ if "html_context" not in globals ():
131
+ html_context = {}
132
+ html_context ["READTHEDOCS" ] = True
129
133
130
- html_theme = "sphinx_rtd_theme"
131
- html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
134
+ html_theme = "sphinx_rtd_theme"
135
+ html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
132
136
133
137
# Theme options are theme-specific and customize the look and feel of a theme
134
138
# further. For a list of options available for each theme, see the
You can’t perform that action at this time.
0 commit comments