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: I730996eb74d16ede3725494b561dc15493741c75
This commit is contained in:
Van Hung Pham 2017-06-28 14:25:36 +07:00
parent 81fb46dc4f
commit 2663e8d75c
2 changed files with 10 additions and 16 deletions

View File

@ -24,8 +24,6 @@
# serve to show the default.
import os
import subprocess
import warnings
# 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
@ -38,7 +36,7 @@ exec(open(os.path.join("ext", "gen_ref.py")).read())
# Add any Sphinx extension module names here, as strings. They can be
# extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'oslosphinx']
extensions = ['sphinx.ext.autodoc', 'openstackdocstheme']
# Add any paths that contain templates here, relative to this directory.
if os.getenv('HUDSON_PUBLISH_DOCS'):
@ -112,7 +110,7 @@ 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'
# 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
@ -147,15 +145,7 @@ html_theme_options = {
# 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.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0]
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
@ -198,7 +188,6 @@ except Exception:
# Output file base name for HTML help builder.
htmlhelp_basename = 'python-heatclientdoc'
# -- Options for LaTeX output -------------------------------------------------
latex_elements = {
@ -273,3 +262,8 @@ texinfo_documents = [
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/python-heatclient'
bug_project = 'python-heatclient'
bug_tag = ''

View File

@ -9,10 +9,10 @@ fixtures>=3.0.0 # Apache-2.0/BSD
requests-mock>=1.1 # Apache-2.0
mock>=2.0 # BSD
mox3!=0.19.0,>=0.7.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
openstackdocstheme>=1.11.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
python-openstackclient!=3.10.0,>=3.3.0 # Apache-2.0
sphinx!=1.6.1,>=1.5.1 # BSD
sphinx>=1.6.2 # BSD
tempest>=14.0.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD