From b68516b9dea9629a188c8b4e839591e2c63fc1e0 Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Wed, 28 Jun 2017 17:50:24 +0900 Subject: [PATCH] Fix openstackdocstheme settings To use openstackdocstheme 1.11.0 properly, this patch fixes some settings according to follow. https://docs.openstack.org/openstackdocstheme/latest/ Change-Id: If3f5c25611dffd462c8b8abe3ecc3f9aa00735ba --- doc/source/conf.py | 26 +++++++++++--------------- releasenotes/source/conf.py | 17 ++++++++++------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 93bc96c..61d3000 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,11 +25,9 @@ from __future__ import print_function import os -import subprocess import sys import django -import openstackdocstheme BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) @@ -174,10 +172,11 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', + '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' @@ -245,14 +244,16 @@ nitpicky = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'openstackdocs' -html_theme_path = [openstackdocstheme.get_html_theme_path()] + +# openstackdocstheme options +repository_name = 'openstack/zun-ui' +bug_project = 'zun-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,15 +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, - stdin=subprocess.PIPE) +# 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 ed9469f..c3bee16 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -21,8 +21,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import openstackdocstheme - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -37,6 +35,7 @@ import openstackdocstheme # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'openstackdocstheme', 'reno.sphinxext', ] @@ -112,13 +111,18 @@ pygments_style = 'sphinx' # a list of builtin themes. html_theme = 'openstackdocs' +# openstackdocstheme options +repository_name = 'openstack/zun-ui' +bug_project = 'zun-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 = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [openstackdocstheme.get_html_theme_path()] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -139,16 +143,15 @@ html_theme_path = [openstackdocstheme.get_html_theme_path()] # 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.