From 2e618589dde73b77b55705cfc9b787b221c644c2 Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Wed, 28 Jun 2017 12:20:53 +0900 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: Id84b9db2ac3bd64fd5b37d13b57da018592eb13d --- doc/source/conf.py | 27 ++++++++++++--------------- releasenotes/source/conf.py | 16 ++++++++++------ test-requirements.txt | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6764019d..65e1eba4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,7 +25,6 @@ from __future__ import print_function import os -import subprocess import sys import django @@ -173,11 +172,11 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', - 'oslosphinx', + 'openstackdocstheme', ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -244,15 +243,17 @@ nitpicky = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme_path = ['.'] -# html_theme = '_theme' +html_theme = 'openstackdocs' + +# openstackdocstheme options +repository_name = 'openstack/magnum-ui' +bug_project = 'magnum-ui' +bug_tag = '' # 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 # documentation. -html_theme_options = { - "nosidebar": "false" -} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] @@ -276,14 +277,10 @@ html_theme_options = { # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [''] +# html_static_path = [''] -# 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"] -html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8') +# Must set this variable to include year, month, day, hours, and minutes. +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 4fd83cbe..74742674 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -35,7 +35,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', + 'openstackdocstheme', 'reno.sphinxext', ] @@ -109,7 +109,12 @@ 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' + +# openstackdocstheme options +repository_name = 'openstack/magnum-ui' +bug_project = 'magnum-ui' +bug_tag = '' # 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 @@ -138,16 +143,15 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [''] +# html_static_path = [''] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] -# 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' +# Must set this variable to include year, month, day, hours, and minutes. +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 0ef7f396..54d9ab7e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,7 +18,7 @@ nose-exclude # LGPL nosehtmloutput>=0.0.3 # Apache-2.0 nosexcover # BSD openstack.nose-plugin>=0.7 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.11.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0 selenium>=2.50.1 # Apache-2.0 sphinx!=1.6.1,>=1.5.1 # BSD