Browse Source

Switch from oslosphinx to openstackdocstheme

As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.

[0] https://review.openstack.org/#/c/472275

Change-Id: I8a18f997aa1216fe8094265b8c0586c42d97b5ec
Dong Ma 1 year ago
parent
commit
124a70fe02
3 changed files with 21 additions and 10 deletions
  1. 10
    4
      doc/source/conf.py
  2. 9
    4
      releasenotes/source/conf.py
  3. 2
    2
      test-requirements.txt

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

@@ -15,8 +15,6 @@
15 15
 import os
16 16
 import sys
17 17
 
18
-import openstackdocstheme
19
-
20 18
 sys.path.insert(0, os.path.abspath('../..'))
21 19
 # -- General configuration ----------------------------------------------------
22 20
 
@@ -25,9 +23,17 @@ sys.path.insert(0, os.path.abspath('../..'))
25 23
 extensions = [
26 24
     'sphinx.ext.autodoc',
27 25
     #'sphinx.ext.intersphinx',
28
-    'oslosphinx'
26
+    'openstackdocstheme'
29 27
 ]
30 28
 
29
+# openstackdocstheme options
30
+repository_name = 'openstack/coverage2sql'
31
+bug_project = 'coverage2sql'
32
+bug_tag = ''
33
+
34
+# Must set this variable to include year, month, day, hours, and minutes.
35
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
36
+
31 37
 # autodoc generation is a bit aggressive and a nuisance when doing heavy
32 38
 # text edit cycles.
33 39
 # execute "export SPHINX_DEBUG=1" in your terminal to disable
@@ -56,7 +62,7 @@ pygments_style = 'sphinx'
56 62
 
57 63
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
58 64
 # Sphinx are currently 'default' and 'sphinxdoc'.
59
-html_theme_path = [openstackdocstheme.get_html_theme_path()]
65
+#html_theme_path = [openstackdocstheme.get_html_theme_path()]
60 66
 html_theme = 'openstackdocs'
61 67
 # html_static_path = ['static']
62 68
 

+ 9
- 4
releasenotes/source/conf.py View File

@@ -26,10 +26,15 @@
26 26
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
27 27
 # ones.
28 28
 extensions = [
29
-    'oslosphinx',
30 29
     'reno.sphinxext',
30
+    'openstackdocstheme'
31 31
 ]
32 32
 
33
+# openstackdocstheme options
34
+repository_name = 'openstack/coverage2sql'
35
+bug_project = 'coverage2sql'
36
+bug_tag = ''
37
+
33 38
 # Add any paths that contain templates here, relative to this directory.
34 39
 templates_path = ['_templates']
35 40
 
@@ -101,7 +106,7 @@ pygments_style = 'sphinx'
101 106
 
102 107
 # The theme to use for HTML and HTML Help pages.  See the documentation for
103 108
 # a list of builtin themes.
104
-html_theme = 'default'
109
+html_theme = 'openstackdocs'
105 110
 
106 111
 # Theme options are theme-specific and customize the look and feel of a theme
107 112
 # further.  For a list of options available for each theme, see the
@@ -109,7 +114,7 @@ html_theme = 'default'
109 114
 #html_theme_options = {}
110 115
 
111 116
 # Add any paths that contain custom themes here, relative to this directory.
112
-#html_theme_path = []
117
+#html_theme_path = [openstackdocstheme.get_html_theme_path()]
113 118
 
114 119
 # The name for this set of Sphinx documents.  If None, it defaults to
115 120
 # "<project> v<release> documentation".
@@ -139,7 +144,7 @@ html_static_path = ['_static']
139 144
 
140 145
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
141 146
 # using the given strftime format.
142
-#html_last_updated_fmt = '%b %d, %Y'
147
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
143 148
 
144 149
 # If true, SmartyPants will be used to convert quotes and dashes to
145 150
 # typographically correct entities.

+ 2
- 2
test-requirements.txt View File

@@ -7,7 +7,7 @@ hacking<0.11,>=0.10.0
7 7
 docutils>=0.11 # OSI-Approved Open Source, Public Domain
8 8
 fixtures>=3.0.0 # Apache-2.0/BSD
9 9
 python-subunit>=0.0.18 # Apache-2.0/BSD
10
-sphinx>=1.5.1 # BSD
10
+sphinx>=1.6.2 # BSD
11 11
 oslosphinx>=4.7.0 # Apache-2.0
12 12
 oslotest>=1.10.0 # Apache-2.0
13 13
 testrepository>=0.0.18 # Apache-2.0/BSD
@@ -19,4 +19,4 @@ os-testr>=0.8.0 # Apache-2.0
19 19
 reno>=1.8.0 # Apache-2.0
20 20
 oslo.concurrency>=3.8.0 # Apache-2.0
21 21
 six>=1.9.0 # MIT
22
-openstackdocstheme>=1.5.0 # Apache-2.0
22
+openstackdocstheme>=1.11.0 # Apache-2.0

Loading…
Cancel
Save