diff --git a/doc/conf.py b/doc/conf.py index 773e3a4..3e43897 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -92,6 +92,11 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'alabaster' +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if on_rtd: # only import and set the theme if we're building docs locally + html_theme = 'sphinx_rtd_theme' + # 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