diff --git a/doc/conf.py.in b/doc/conf.py.in index 6046d371..5d94d815 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -12,7 +12,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os # import sys # sys.path.insert(0, os.path.abspath('.')) @@ -71,10 +71,16 @@ pygments_style = None # -- Options for HTML output ------------------------------------------------- +# is whether we are on readthedocs.io +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +if on_rtd: + html_theme = 'sphinx_rtd_theme' +else: + html_theme = 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the