diff options
-rw-r--r-- | docs/conf.py | 11 | ||||
-rw-r--r-- | docs/requirements.txt | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index 652566e..f692cf9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,12 @@ # # Patchwork documentation build configuration file +try: + import sphinx_rtd_theme + has_rtd_theme = True +except ImportError: + has_rtd_theme = False + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -13,6 +19,11 @@ needs_sphinx = '1.5' # ones. extensions = ['sphinx.ext.todo', 'reno.sphinxext'] +if has_rtd_theme: + html_theme = 'sphinx_rtd_theme' + # TODO(stephenfin): Remove this once we use v0.2.5 + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + # Add any paths that contain templates here, relative to this directory. templates_path = [] diff --git a/docs/requirements.txt b/docs/requirements.txt index e23dfd3..86571f4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ sphinx>=1.5 reno>=2.2 +sphinx_rtd_theme==0.2.4 |