Merge "Tolerate missing openstackdocstheme in docs"

This commit is contained in:
Zuul 2018-10-23 14:31:17 +00:00 committed by Gerrit Code Review
commit 93a31be5cc
1 changed files with 10 additions and 3 deletions

View File

@ -21,10 +21,14 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'openstackdocstheme',
] ]
try:
import openstackdocstheme
extensions.append('openstackdocstheme')
except ImportError:
openstackdocstheme = None
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles. # text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable # execute "export SPHINX_DEBUG=1" in your terminal to disable
@ -56,7 +60,10 @@ pygments_style = 'sphinx'
# html_theme_path = ["."] # html_theme_path = ["."]
# html_theme = '_theme' # html_theme = '_theme'
# html_static_path = ['static'] # html_static_path = ['static']
html_theme = 'openstackdocs' if openstackdocstheme is not None:
html_theme = 'openstackdocs'
else:
html_theme = 'default'
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project htmlhelp_basename = '%sdoc' % project