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: I47d858fafd5d57f00cab9d7a4b87950320febf70
Van Hung Pham 1 year ago
parent
commit
bdfa6d59cc
2 changed files with 10 additions and 8 deletions
  1. 8
    7
      doc/source/conf.py
  2. 2
    1
      test-requirements.txt

+ 8
- 7
doc/source/conf.py View File

@@ -39,6 +39,7 @@ extensions = ['sphinx.ext.autodoc',
39 39
               'sphinx.ext.todo',
40 40
               'sphinx.ext.coverage',
41 41
               'sphinx.ext.intersphinx',
42
+              'openstackdocstheme',
42 43
              ]
43 44
 
44 45
 todo_include_todos = True
@@ -116,6 +117,7 @@ modindex_common_prefix = ['ldappool.']
116 117
 # Sphinx are currently 'default' and 'sphinxdoc'.
117 118
 #html_theme_path = ["."]
118 119
 #html_theme = '_theme'
120
+html_theme = 'openstackdocs'
119 121
 
120 122
 # Theme options are theme-specific and customize the look and feel of a theme
121 123
 # further.  For a list of options available for each theme, see the
@@ -148,13 +150,7 @@ modindex_common_prefix = ['ldappool.']
148 150
 
149 151
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
150 152
 # using the given strftime format.
151
-git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
152
-           "-n1"]
153
-try:
154
-    html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
155
-except:
156
-    warnings.warn('Cannot get last updated time from git repository. '
157
-                  'Not setting "html_last_updated_fmt".')
153
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
158 154
 
159 155
 # If true, SmartyPants will be used to convert quotes and dashes to
160 156
 # typographically correct entities.
@@ -228,3 +224,8 @@ latex_documents = [
228 224
 intersphinx_mapping = {
229 225
     'python': ('http://docs.python.org/', None),
230 226
 }
227
+
228
+# -- Options for openstackdocstheme -------------------------------------------
229
+repository_name = 'openstack/ldappool'
230
+bug_project = 'ldappool'
231
+bug_tag = ''

+ 2
- 1
test-requirements.txt View File

@@ -8,7 +8,8 @@ flake8-docstrings==0.2.1.post1 # MIT
8 8
 
9 9
 coverage!=4.4,>=4.0 # Apache-2.0
10 10
 fixtures>=3.0.0 # Apache-2.0/BSD
11
-sphinx!=1.6.1,>=1.5.1 # BSD
11
+sphinx>=1.6.2 # BSD
12
+openstackdocstheme>=1.11.0 # Apache-2.0
12 13
 testrepository>=0.0.18 # Apache-2.0/BSD
13 14
 testresources>=0.2.4 # Apache-2.0/BSD
14 15
 testtools>=1.4.0 # MIT

Loading…
Cancel
Save