summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVan Hung Pham <hungpv@vn.fujitsu.com>2017-06-30 15:21:25 +0700
committerVan Hung Pham <hungpv@vn.fujitsu.com>2017-06-30 15:21:25 +0700
commit27296d58587a1a41535667d04b76c466ac404b53 (patch)
tree3bbd9efb9735e9c66c0379e6de38da3c3accf9c0
parentb9e01bda73e3ea8ac4266e90760ab60025f6da7d (diff)
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: I5150a456df75d61035a6f00366fa70bd4ec83457
Notes
Notes (review): Code-Review+1: Andreas Jaeger <jaegerandi@gmail.com> Code-Review+1: Doug Hellmann <doug@doughellmann.com> Code-Review+2: Lance Bragstad <lbragstad@gmail.com> Code-Review+2: Colleen Murphy <colleen@gazlene.net> Workflow+1: Colleen Murphy <colleen@gazlene.net> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 07 Jul 2017 16:56:15 +0000 Reviewed-on: https://review.openstack.org/479206 Project: openstack/keystonemiddleware Branch: refs/heads/master
-rw-r--r--doc/source/conf.py19
-rw-r--r--releasenotes/source/conf.py10
-rw-r--r--test-requirements.txt4
3 files changed, 18 insertions, 15 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 323a030..504eb9a 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -13,9 +13,7 @@
13from __future__ import unicode_literals 13from __future__ import unicode_literals
14 14
15import os 15import os
16import subprocess
17import sys 16import sys
18import warnings
19 17
20import pbr.version 18import pbr.version
21 19
@@ -43,7 +41,7 @@ extensions = ['sphinx.ext.autodoc',
43 'sphinx.ext.todo', 41 'sphinx.ext.todo',
44 'sphinx.ext.coverage', 42 'sphinx.ext.coverage',
45 'sphinx.ext.intersphinx', 43 'sphinx.ext.intersphinx',
46 'oslosphinx', 44 'openstackdocstheme',
47 'oslo_config.sphinxconfiggen' 45 'oslo_config.sphinxconfiggen'
48 ] 46 ]
49 47
@@ -126,6 +124,7 @@ modindex_common_prefix = ['keystonemiddleware.']
126# Sphinx are currently 'default' and 'sphinxdoc'. 124# Sphinx are currently 'default' and 'sphinxdoc'.
127#html_theme_path = ["."] 125#html_theme_path = ["."]
128#html_theme = '_theme' 126#html_theme = '_theme'
127html_theme = 'openstackdocs'
129 128
130# Theme options are theme-specific and customize the look and feel of a theme 129# Theme options are theme-specific and customize the look and feel of a theme
131# further. For a list of options available for each theme, see the 130# further. For a list of options available for each theme, see the
@@ -158,14 +157,7 @@ html_static_path = ['_static']
158 157
159# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 158# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160# using the given strftime format. 159# using the given strftime format.
161git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", 160html_last_updated_fmt = '%Y-%m-%d %H:%M'
162 "-n1"]
163try:
164 html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
165
166except Exception:
167 warnings.warn('Cannot get last updated time from git repository. '
168 'Not setting "html_last_updated_fmt".')
169 161
170# If true, SmartyPants will be used to convert quotes and dashes to 162# If true, SmartyPants will be used to convert quotes and dashes to
171# typographically correct entities. 163# typographically correct entities.
@@ -241,3 +233,8 @@ keystoneclient = 'https://docs.openstack.org/developer/python-keystoneclient/'
241 233
242intersphinx_mapping = {'keystoneclient': (keystoneclient, None), 234intersphinx_mapping = {'keystoneclient': (keystoneclient, None),
243 } 235 }
236
237# -- Options for openstackdocstheme -------------------------------------------
238repository_name = 'openstack/keystonemiddleware'
239bug_project = 'keystonemiddleware'
240bug_tag = ''
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index eab8c72..5043d3a 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -37,7 +37,7 @@
37# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 37# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
38# ones. 38# ones.
39extensions = [ 39extensions = [
40 'oslosphinx', 40 'openstackdocstheme',
41 'reno.sphinxext', 41 'reno.sphinxext',
42] 42]
43 43
@@ -112,7 +112,7 @@ pygments_style = 'sphinx'
112 112
113# The theme to use for HTML and HTML Help pages. See the documentation for 113# The theme to use for HTML and HTML Help pages. See the documentation for
114# a list of builtin themes. 114# a list of builtin themes.
115html_theme = 'default' 115html_theme = 'openstackdocs'
116 116
117# Theme options are theme-specific and customize the look and feel of a theme 117# Theme options are theme-specific and customize the look and feel of a theme
118# further. For a list of options available for each theme, see the 118# further. For a list of options available for each theme, see the
@@ -151,6 +151,7 @@ html_static_path = ['_static']
151# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 151# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
152# using the given strftime format. 152# using the given strftime format.
153# html_last_updated_fmt = '%b %d, %Y' 153# html_last_updated_fmt = '%b %d, %Y'
154html_last_updated_fmt = '%Y-%m-%d %H:%M'
154 155
155# If true, SmartyPants will be used to convert quotes and dashes to 156# If true, SmartyPants will be used to convert quotes and dashes to
156# typographically correct entities. 157# typographically correct entities.
@@ -277,3 +278,8 @@ texinfo_documents = [
277 278
278# -- Options for Internationalization output ------------------------------ 279# -- Options for Internationalization output ------------------------------
279locale_dirs = ['locale/'] 280locale_dirs = ['locale/']
281
282# -- Options for openstackdocstheme -------------------------------------------
283repository_name = 'openstack/keystonemiddleware'
284bug_project = 'keystonemiddleware'
285bug_tag = ''
diff --git a/test-requirements.txt b/test-requirements.txt
index c17dab0..f0a7384 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -10,11 +10,11 @@ cryptography>=1.6 # BSD/Apache-2.0
10docutils>=0.11 # OSI-Approved Open Source, Public Domain 10docutils>=0.11 # OSI-Approved Open Source, Public Domain
11fixtures>=3.0.0 # Apache-2.0/BSD 11fixtures>=3.0.0 # Apache-2.0/BSD
12mock>=2.0 # BSD 12mock>=2.0 # BSD
13oslosphinx>=4.7.0 # Apache-2.0 13openstackdocstheme>=1.11.0 # Apache-2.0
14oslotest>=1.10.0 # Apache-2.0 14oslotest>=1.10.0 # Apache-2.0
15reno!=2.3.1,>=1.8.0 # Apache-2.0 15reno!=2.3.1,>=1.8.0 # Apache-2.0
16requests-mock>=1.1 # Apache-2.0 16requests-mock>=1.1 # Apache-2.0
17sphinx!=1.6.1,>=1.5.1 # BSD 17sphinx>=1.6.2 # BSD
18stevedore>=1.20.0 # Apache-2.0 18stevedore>=1.20.0 # Apache-2.0
19testrepository>=0.0.18 # Apache-2.0/BSD 19testrepository>=0.0.18 # Apache-2.0/BSD
20testresources>=0.2.4 # Apache-2.0/BSD 20testresources>=0.2.4 # Apache-2.0/BSD