File tree 1 file changed +30
-5
lines changed
1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change 29
29
import sys
30
30
import warnings
31
31
32
+ # TODO(Graham Hayes): Remove the following block of code when os-api-ref is
33
+ # using openstackdocstheme
34
+
35
+ import os_api_ref
36
+
37
+ if getattr (os_api_ref , 'THEME' , 'olsosphinx' ) == 'openstackdocstheme' :
38
+ # We are on the new version with openstackdocstheme support
39
+
40
+ extensions = [
41
+ 'os_api_ref' ,
42
+ ]
43
+
44
+ import openstackdocstheme # noqa
45
+
46
+ html_theme = 'openstackdocs'
47
+ html_theme_path = [openstackdocstheme .get_html_theme_path ()]
48
+ html_theme_options = {
49
+ "sidebar_mode" : "toc" ,
50
+ }
51
+
52
+ else :
53
+ # We are on the old version without openstackdocstheme support
54
+
55
+ extensions = [
56
+ 'os_api_ref' ,
57
+ 'oslosphinx' ,
58
+ ]
59
+
60
+ # End temporary block
61
+
32
62
# If extensions (or modules to document with autodoc) are in another directory,
33
63
# add these directories to sys.path here. If the directory is relative to the
34
64
# documentation root, use os.path.abspath to make it absolute, like shown here.
41
71
# Add any Sphinx extension module names here, as strings. They can be
42
72
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
43
73
44
- extensions = [
45
- 'os_api_ref' ,
46
- 'oslosphinx' ,
47
- ]
48
-
49
74
# The suffix of source filenames.
50
75
source_suffix = '.rst'
51
76
You can’t perform that action at this time.
0 commit comments