diff options
Diffstat (limited to 'doc/conf.py')
-rw-r--r-- | doc/conf.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/conf.py b/doc/conf.py index 30c0281f..56dbec23 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,6 +23,9 @@ import sys, os # Copied from django docs: sys.path.append(os.path.join(os.path.dirname(__file__), "_ext")) +# on_rtd is whether we are on readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions @@ -103,7 +106,16 @@ 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 = 'default' +#html_theme = 'default' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# otherwise, readthedocs.org uses their theme by default, so no need to specify it + + # 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 |