Browse Source

Merge "Tolerate missing openstackdocstheme in docs"

Zuul 6 months ago
parent
commit
93a31be5cc
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      doc/source/conf.py

+ 10
- 3
doc/source/conf.py View File

@@ -21,10 +21,14 @@ sys.path.insert(0, os.path.abspath('../..'))
21 21
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
22 22
 extensions = [
23 23
     'sphinx.ext.autodoc',
24
-    #'sphinx.ext.intersphinx',
25
-    'openstackdocstheme',
26 24
 ]
27 25
 
26
+try:
27
+    import openstackdocstheme
28
+    extensions.append('openstackdocstheme')
29
+except ImportError:
30
+    openstackdocstheme = None
31
+
28 32
 # autodoc generation is a bit aggressive and a nuisance when doing heavy
29 33
 # text edit cycles.
30 34
 # execute "export SPHINX_DEBUG=1" in your terminal to disable
@@ -56,7 +60,10 @@ pygments_style = 'sphinx'
56 60
 # html_theme_path = ["."]
57 61
 # html_theme = '_theme'
58 62
 # html_static_path = ['static']
59
-html_theme = 'openstackdocs'
63
+if openstackdocstheme is not None:
64
+    html_theme = 'openstackdocs'
65
+else:
66
+    html_theme = 'default'
60 67
 
61 68
 # Output file base name for HTML help builder.
62 69
 htmlhelp_basename = '%sdoc' % project

Loading…
Cancel
Save