aboutsummaryrefslogtreecommitdiffstats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-08 10:49:22 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-08 10:49:22 -0800
commit27283cfa4300162f6a7a667364acab781c49710f (patch)
treef416c78fdf919632096b58a2a16cebc48c745c08 /docs/conf.py
parent635b542ded9ede772a2ca907e8bb5349ded333bd (diff)
downloadcryptography-27283cfa4300162f6a7a667364acab781c49710f.tar.gz
cryptography-27283cfa4300162f6a7a667364acab781c49710f.tar.bz2
cryptography-27283cfa4300162f6a7a667364acab781c49710f.zip
Try to use the sphinx rtd theme locally if it's installed
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 69be32e9..77050e72 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -14,6 +14,12 @@
import os
import sys
+try:
+ import sphinx_rtd_theme
+except ImportError:
+ sphinx_rtd_theme = None
+
+
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -98,16 +104,18 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+
+if sphinx_rtd_theme:
+ html_theme = "sphinx_rtd_theme"
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+else:
+ 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
# documentation.
#html_theme_options = {}
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None