Skip to content

Commit 9994f94

Browse files
author
Martin O'Hanlon
committed
rtd theme
1 parent 2697a09 commit 9994f94

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/conf.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
1616
sys.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
1920
class 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,

0 commit comments

Comments
 (0)