diff options
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/docs/conf.py b/docs/conf.py index 092206192..768e5dafd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,13 +101,13 @@ 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' -if not on_rtd: - try: - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - except ImportError: - pass +if os.environ.get('DOCS_LOCAL'): + import sphinx_rtd_theme + html_theme = "sphinx_rtd_theme" + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +else: + # on RTD + html_theme = 'default' # 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 @@ -115,13 +115,6 @@ if not on_rtd: #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [] -if not on_rtd: - try: - import sphinx_rtd_theme - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - except ImportError: - pass # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". |