Skip to content

Commit 04f477f

Browse files
committed
pull in some @MoonRaker changes to docs conf.py
1 parent 125cae2 commit 04f477f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/sphinx/source/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def __getattr__(cls, name):
3737

3838
# -- General configuration ------------------------------------------------
3939

40+
# turns off numpydoc autosummary warnings
41+
numpydoc_show_class_members = False
42+
4043
# If your documentation needs a minimal Sphinx version, state it here.
4144
#needs_sphinx = '1.0'
4245

@@ -127,7 +130,15 @@ def __getattr__(cls, name):
127130

128131
# The theme to use for HTML and HTML Help pages. See the documentation for
129132
# a list of builtin themes.
130-
html_theme = 'default'
133+
# on_rtd is whether we are on readthedocs.org
134+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
135+
136+
if not on_rtd: # only import and set the theme if we're building docs locally
137+
import sphinx_rtd_theme
138+
html_theme = 'sphinx_rtd_theme'
139+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
140+
else:
141+
html_theme = 'default'
131142

132143
# Theme options are theme-specific and customize the look and feel of a theme
133144
# further. For a list of options available for each theme, see the

0 commit comments

Comments
 (0)