From 124a70fe02209c47b6721a9dd23144becbde3840 Mon Sep 17 00:00:00 2001 From: Dong Ma Date: Mon, 26 Jun 2017 00:14:33 +0800 Subject: [PATCH] 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 --- doc/source/conf.py | 14 ++++++++++---- releasenotes/source/conf.py | 13 +++++++++---- test-requirements.txt | 4 ++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 79b440a..97a0fcc 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,8 +15,6 @@ import os import sys -import openstackdocstheme - sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- @@ -25,9 +23,17 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/coverage2sql' +bug_project = 'coverage2sql' +bug_tag = '' + +# Must set this variable to include year, month, day, hours, and minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -56,7 +62,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme_path = [openstackdocstheme.get_html_theme_path()] +#html_theme_path = [openstackdocstheme.get_html_theme_path()] html_theme = 'openstackdocs' # html_static_path = ['static'] diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 126baeb..5da50dd 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -26,10 +26,15 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/coverage2sql' +bug_project = 'coverage2sql' +bug_tag = '' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -101,7 +106,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 @@ -109,7 +114,7 @@ html_theme = 'default' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +#html_theme_path = [openstackdocstheme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -139,7 +144,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 36ee7dd..35135d7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ hacking<0.11,>=0.10.0 docutils>=0.11 # OSI-Approved Open Source, Public Domain fixtures>=3.0.0 # Apache-2.0/BSD python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx>=1.5.1 # BSD +sphinx>=1.6.2 # BSD oslosphinx>=4.7.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD @@ -19,4 +19,4 @@ os-testr>=0.8.0 # Apache-2.0 reno>=1.8.0 # Apache-2.0 oslo.concurrency>=3.8.0 # Apache-2.0 six>=1.9.0 # MIT -openstackdocstheme>=1.5.0 # Apache-2.0 +openstackdocstheme>=1.11.0 # Apache-2.0