Skip to content

Commit 1ba0d23

Browse files
committed
Always use Sphinx Read The Docs theme
1 parent ec8a96d commit 1ba0d23

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

docs/conf.py

+4-13
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,11 @@
166166
'Miscellaneous'),
167167
]
168168

169-
# Following is taken from https://github.com/snide/sphinx_rtd_theme#
170-
# using-this-theme-locally-then-building-on-read-the-docs
169+
# Set Sphinx Read The Docs theme
170+
import sphinx_rtd_theme
171171

172-
# on_rtd is whether we are on readthedocs.org,
173-
# this line of code grabbed from docs.readthedocs.org
174-
175-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
176-
177-
if not on_rtd: # only import and set the theme if we're building docs locally
178-
import sphinx_rtd_theme
179-
html_theme = 'sphinx_rtd_theme'
180-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
181-
182-
# otherwise, readthedocs.org uses their theme by default, no need to specify it
172+
html_theme = 'sphinx_rtd_theme'
173+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
183174

184175
# disable cross-reference for ivar
185176
# patch taken from http://stackoverflow.com/a/41184353/1932023

0 commit comments

Comments
 (0)