Don't specify theme when building on RTD

See https://github.com/snide/sphinx_rtd_theme/issues/68
pull/68/merge
Tom Dyson 2014-02-18 17:59:36 +00:00
rodzic 3b691bc758
commit 5bbb62d2cf
1 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -14,7 +14,14 @@
import sys
import os
import sphinx_rtd_theme
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.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()]
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@ -97,9 +104,6 @@ pygments_style = 'sphinx'
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
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