diff --git a/doc/source/conf.py b/doc/source/conf.py index 27ad9f0..76aa4d0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -161,11 +161,14 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -import sphinx_rtd_theme -html_theme = "sphinx_rtd_theme" - -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +on_rtd = os.environ.get('READTHEDOCS') == 'True' +if on_rtd: + html_theme = 'default' +else: + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] #html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme