From 57b14b8035fb5cf0b3f12221cb028aed8a891eff Mon Sep 17 00:00:00 2001 From: chenxing Date: Wed, 5 Jul 2017 08:58:31 +0000 Subject: [PATCH] Switch to openstackdocstheme Change-Id: Ib8d4af4feb11a5e60ff0394ab166864fcf635db3 --- doc/source/conf.py | 21 ++++++--------------- releasenotes/source/conf.py | 12 ++++++------ test-requirements.txt | 2 +- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 28400c0ee62..c2e6957ee2d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -10,9 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -# cinder documentation build configuration file, created by -# sphinx-quickstart on Sat May 1 15:17:47 2010. -# # This file is execfile()d with the current directory set # to its containing dir. # @@ -25,7 +22,6 @@ import eventlet import os import sys -import warnings from cinder import objects @@ -60,7 +56,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.graphviz', - 'oslosphinx', + 'openstackdocstheme', 'stevedore.sphinxext', 'oslo_config.sphinxconfiggen', 'ext.cinder_driverlist', @@ -98,6 +94,9 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. +repository_name = 'openstack/cinder' +bug_project = 'cinder' +bug_tag = 'doc' project = u'cinder' copyright = u'2010-present, OpenStack Foundation' @@ -167,7 +166,7 @@ man_pages = [ # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] -# html_theme = '_theme' +html_theme = 'openstackdocs' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -200,15 +199,7 @@ html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -git_cmd = ["git", "log", "--pretty=format:%ad, commit %h", "--date=local", - "-n1"] -try: - import subprocess - html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8') -except Exception: - warnings.warn('Cannot get last updated time from git repository. ' - 'Not setting "html_last_updated_fmt".') +html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index b120c12dd01..9e161dd5a97 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -12,9 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Cinder Release Notes documentation build configuration file, created by -# sphinx-quickstart on Tue Nov 4 17:02:44 2015. -# # This file is execfile()d with the current directory set to its # containing dir. # @@ -38,7 +35,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', + 'openstackdocstheme', 'reno.sphinxext', ] @@ -55,6 +52,9 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. +repository_name = 'openstack/cinder' +bug_project = 'cinder' +bug_tag = 'doc' project = u'Cinder Release Notes' copyright = u'2015, Cinder Developers' @@ -112,7 +112,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'openstackdocs' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -150,7 +150,7 @@ html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' +html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/test-requirements.txt b/test-requirements.txt index ccb5049ba09..7228ac9814b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,7 +18,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT testresources>=0.2.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.11.0 # Apache-2.0 oslo.versionedobjects[fixtures]>=1.17.0 # Apache-2.0 os-testr>=0.8.0 # Apache-2.0 tempest>=14.0.0 # Apache-2.0