From ff02d0b90c3f0db69dae2d3f8668116485729479 Mon Sep 17 00:00:00 2001 From: rlacko Date: Thu, 15 May 2014 10:34:44 +0200 Subject: Use sphinx_rtd_theme in ReST documentation --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index c92de2e92..0af22dbcb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -108,6 +108,15 @@ html_theme = 'default' # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] +# on_rtd is whether we are on readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +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()] + # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None -- cgit v1.2.3