diff options
author | Stephen Finucane <stephen@that.guru> | 2017-11-02 16:23:02 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-11-02 16:23:57 +0000 |
commit | 56fe8c496d615359b4570249e4bd364912d95dd1 (patch) | |
tree | 0a3bb305dff75349fda138d30ed34d861f9b78ca | |
parent | 018560c49a97b891f160f5c186b96e0cad5172e6 (diff) | |
download | patchwork-56fe8c496d615359b4570249e4bd364912d95dd1.tar patchwork-56fe8c496d615359b4570249e4bd364912d95dd1.tar.gz |
doc: Use RTD theme locally
This ensures things look the same locally as on readthedocs.org.
Signed-off-by: Stephen Finucane <stephen@that.guru>
-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 |