diff options
author | Graham Hayes <graham.hayes@hpe.com> | 2016-08-19 14:35:21 +0100 |
---|---|---|
committer | Graham Hayes <graham.hayes@hpe.com> | 2016-08-19 16:44:02 +0100 |
commit | 80888cf344cf3c294df35f69e9f04a16e87c47e1 (patch) | |
tree | 9fc4a0dea8bb4e77c34afc8d57bde9322e7b9e32 /api-ref/source/conf.py | |
parent | 45a181928febda831ec18931d571b584d9103033 (diff) | |
download | keystone-80888cf344cf3c294df35f69e9f04a16e87c47e1.tar.gz |
Get ready for os-api-ref sphinx theme change
Change-Id: I528d91833156b1c4e638dab2a249c3b2871004b4
Diffstat (limited to 'api-ref/source/conf.py')
-rw-r--r-- | api-ref/source/conf.py | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index a5eb4be08..5cbec58b2 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -27,6 +27,36 @@ import subprocess import warnings +# TODO(Graham Hayes): Remove the following block of code when os-api-ref is +# using openstackdocstheme + +import os_api_ref + +if getattr(os_api_ref, 'THEME', 'olsosphinx') == 'openstackdocstheme': + # We are on the new version with openstackdocstheme support + + extensions = [ + 'os_api_ref', + ] + + import openstackdocstheme # noqa + + html_theme = 'openstackdocs' + html_theme_path = [openstackdocstheme.get_html_theme_path()] + html_theme_options = { + "sidebar_mode": "toc", + } + +else: + # We are on the old version without openstackdocstheme support + + extensions = [ + 'os_api_ref', + 'oslosphinx', + ] + +# End temporary block + # 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. @@ -40,10 +70,6 @@ import warnings # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones.[] -extensions = [ - 'os_api_ref', - 'oslosphinx', -] # Add any paths that contain templates here, relative to this directory. # templates_path = ['_templates'] |