File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1414import sys
1515# sys.path.insert(0, os.path.abspath('.'))
1616sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), '..' ))
17+ on_rtd = os .environ .get ('READTHEDOCS' , None ) == 'True'
1718
1819# Mock out certain modules while building documentation
1920class Mock :
@@ -73,7 +74,23 @@ def __getattr__(cls, name):
7374# The theme to use for HTML and HTML Help pages. See the documentation for
7475# a list of builtin themes.
7576#
76- html_theme = 'alabaster'
77+ # The theme to use for HTML and HTML Help pages. See the documentation for
78+ # a list of builtin themes.
79+ #
80+ if on_rtd :
81+ html_theme = 'sphinx_rtd_theme'
82+ #html_theme_options = {}
83+ html_sidebars = {
84+ '**' : [
85+ 'globaltoc.html' ,
86+ 'relations.html' ,
87+ 'searchbox.html' ,
88+ ],
89+ }
90+ else :
91+ html_theme = 'alabaster'
92+ #html_theme_options = {}
93+ #html_sidebars = {}
7794
7895# Add any paths that contain custom static files (such as style sheets) here,
7996# relative to this directory. They are copied after the builtin static files,
You can’t perform that action at this time.
0 commit comments