Use openstackdocstheme 1.11 everywhere

Switch to use openstackdocstheme 1.11 for all documents and set it up
following correctly.

Change-Id: If312a985702b1b591d3ca7346c5349905b23a66a
This commit is contained in:
Andreas Jaeger 2017-06-29 09:28:49 +02:00
parent b86d6b5660
commit 1d1a6f3729
5 changed files with 31 additions and 46 deletions

View File

@ -17,9 +17,6 @@
# serve to show the default.
# import sys
import subprocess
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
@ -34,7 +31,7 @@ import openstackdocstheme
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = ['openstackdocstheme']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -50,6 +47,11 @@ master_doc = 'index'
# General information about the project.
project = u'Key Manager API Guide'
bug_tag = u'api-guide'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
copyright = u'2016, OpenStack contributors'
@ -73,27 +75,6 @@ release = version_info.release_string()
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# A few variables have to be set for the log-a-bug feature.
# giturl: The location of conf.py on Git. Must be set manually.
# gitsha: The SHA checksum of the bug description. Extracted from git log.
# bug_tag: Tag for categorizing the bug. Must be set manually.
# bug_project: Launchpad project to file bugs against.
# These variables are passed to the logabug code via html_context.
giturl = (u"https://git.openstack.org/cgit/openstack/barbican/tree/"
"api-guide/source")
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
gitsha = subprocess.check_output(git_cmd).decode('utf-8')
# source tree
pwd = subprocess.check_output("pwd").decode('utf-8')
# html_context allows us to pass arbitrary values into the html template
html_context = {"pwd": pwd,
"gitsha": gitsha,
"bug_tag": bug_tag,
"giturl": giturl,
"bug_project": "barbican"}
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
@ -135,7 +116,7 @@ html_theme = 'openstackdocs'
# 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
# "<project> v<release> documentation".

View File

@ -23,20 +23,16 @@
# serve to show the default.
import os
import subprocess
import sys
import warnings
import openstackdocstheme
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = {
"sidebar_mode": "toc",
}
extensions = [
'os_api_ref',
'openstackdocstheme'
]
# If extensions (or modules to document with autodoc) are in another directory,
@ -72,6 +68,10 @@ master_doc = 'index'
# General information about the project.
project = u'Key Manager API Reference'
copyright = u'OpenStack Foundation'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = 'api-ref'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -83,8 +83,6 @@ release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
html_context = {'bug_project': 'barbican', 'bug_tag': 'api-ref'}
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
@ -174,13 +172,7 @@ todo_include_todos = False
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
try:
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.

View File

@ -22,7 +22,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
# 'sphinx.ext.intersphinx',
'oslosphinx'
'openstackdocstheme'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -38,6 +38,12 @@ master_doc = 'index'
# General information about the project.
project = u'Barbican'
copyright = u'2014, OpenStack Foundation'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = ''
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@ -55,6 +61,7 @@ pygments_style = 'sphinx'
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
html_theme = 'openstackdocs'
# html_static_path = ['static']
html_theme_options = {}

View File

@ -37,7 +37,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
@ -56,6 +56,12 @@ master_doc = 'index'
# General information about the project.
project = u'Barbican Release Notes'
copyright = u'2015, Barbican Developers'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = ''
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -110,7 +116,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

View File

@ -23,8 +23,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
bandit>=1.1.0 # Apache-2.0
# Documentation build requirements
sphinx!=1.6.1,>=1.5.1 # BSD
oslosphinx>=4.7.0 # Apache-2.0
sphinx>=1.6.2 # BSD
os-api-ref>=1.0.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0
openstackdocstheme>=1.5.0 # Apache-2.0
openstackdocstheme>=1.11.0 # Apache-2.0