Merge "Switch from oslosphinx to openstackdocstheme"

This commit is contained in:
Jenkins 2017-07-07 17:46:54 +00:00 committed by Gerrit Code Review
commit 3088420ece
3 changed files with 15 additions and 17 deletions

View File

@ -25,11 +25,7 @@
# serve to show the default.
import os
import subprocess
import sys
import warnings
import openstackdocstheme
# NOTE(dstanek): adds _ to the builtins so keystone modules can be imported
__builtins__['_'] = str
@ -54,7 +50,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'oslo_config.sphinxconfiggen',
'oslo_policy.sphinxpolicygen',
'oslosphinx',
'openstackdocstheme',
'ext.support_matrix',
]
@ -137,7 +133,6 @@ man_pages = [
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
@ -172,14 +167,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'
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.
@ -287,3 +275,8 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
# intersphinx_mapping = {'http://docs.python.org/': None}
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/keystone'
bug_project = 'keystone'
bug_tag = 'doc'

View File

@ -37,7 +37,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
@ -112,7 +112,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
@ -151,6 +151,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.
@ -275,3 +276,8 @@ texinfo_documents = [
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/keystone'
bug_project = 'keystone'
bug_tag = 'doc'

View File

@ -33,7 +33,6 @@ testtools>=1.4.0 # MIT
# For documentation
openstackdocstheme>=1.11.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0
tempest>=14.0.0 # Apache-2.0