From f74fff4d63dc603c236956ad5b5131118e664eaa Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Fri, 18 Aug 2017 07:49:58 -0400 Subject: [PATCH] doc migration: openstackdocstheme This patch transitions to the openstackdocs theme from oslosphinx in accord with the OpenStack manuals project migration spec [1]. [1] https://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html Change-Id: I92cc896bbd505d10c9dc7101bacb4caedf43da8f Partial-Bug: #1706181 Needed-By: I9c378a188f9009a82100f5488a936d43536bd5b6 Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454 --- doc/source/conf.py | 15 ++++++++++++--- releasenotes/source/conf.py | 14 +++++++++++--- test-requirements.txt | 2 +- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6aecb421..036fb493 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,8 @@ import os import sys +import openstackdocstheme + sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- @@ -23,9 +25,15 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme', ] +# openstackdocstheme options +repository_name = 'openstack/manila-ui' +bug_project = 'manila-ui' +bug_tag = 'docs' +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 @@ -55,7 +63,8 @@ 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 = ["."] -# html_theme = '_theme' +html_theme = 'openstackdocs' +html_theme_path = [openstackdocstheme.get_html_theme_path()] # html_static_path = ['static'] # Output file base name for HTML help builder. @@ -72,4 +81,4 @@ latex_documents = [ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} \ No newline at end of file +#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 471cda45..7336385d 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -33,6 +33,8 @@ import pbr.version +import openstackdocstheme + # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' @@ -40,10 +42,16 @@ import pbr.version # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', + 'openstackdocstheme', ] +# openstackdocsthem options +repository_name = 'openstack/manila-ui' +bug_project = 'manila-ui' +bug_tag = 'release notes' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -115,7 +123,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 @@ -123,7 +131,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". diff --git a/test-requirements.txt b/test-requirements.txt index d62a3d64..2fc2bf48 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,7 +12,7 @@ mock>=2.0.0 # BSD mox3!=0.19.0,>=0.7.0 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD sphinx>=1.6.2 # BSD -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.16.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT