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: If3a8f6668d0a4e32bd8a20330d973249ce6a5b46
This commit is contained in:
Van Hung Pham
2017-06-30 19:04:55 +07:00
parent 937f4d62be
commit 2ea1fcacfd
3 changed files with 17 additions and 13 deletions

View File

@@ -13,9 +13,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import os import os
import subprocess
import sys import sys
import warnings
import pbr.version import pbr.version
@@ -37,7 +35,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'oslosphinx', 'openstackdocstheme',
] ]
todo_include_todos = True todo_include_todos = True
@@ -116,6 +114,7 @@ modindex_common_prefix = ['keystoneclient.']
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
#html_theme_path = ["."] #html_theme_path = ["."]
#html_theme = '_theme' #html_theme = '_theme'
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme # 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 # further. For a list of options available for each theme, see the
@@ -148,13 +147,7 @@ modindex_common_prefix = ['keystoneclient.']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format. # using the given strftime format.
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", html_last_updated_fmt = '%Y-%m-%d %H:%M'
"-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".')
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
@@ -232,3 +225,8 @@ intersphinx_mapping = {
'osloconfig': ('https://docs.openstack.org/developer/oslo.config/', None), 'osloconfig': ('https://docs.openstack.org/developer/oslo.config/', None),
'keystoneauth1': (keystoneauth_url, None), 'keystoneauth1': (keystoneauth_url, None),
} }
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/python-keystoneclient'
bug_project = 'python-keystoneclient'
bug_tag = ''

View File

@@ -37,7 +37,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'oslosphinx', 'openstackdocstheme',
'reno.sphinxext', 'reno.sphinxext',
] ]
@@ -112,7 +112,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # 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 # 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 # 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, # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format. # using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y' # 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 # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
@@ -277,3 +278,8 @@ texinfo_documents = [
# -- Options for Internationalization output ------------------------------ # -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/'] locale_dirs = ['locale/']
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/python-keystoneclient'
bug_project = 'python-keystoneclient'
bug_tag = ''

View File

@@ -11,7 +11,7 @@ keyring>=5.5.1 # MIT/PSF
lxml!=3.7.0,>=2.3 # BSD lxml!=3.7.0,>=2.3 # BSD
mock>=2.0 # BSD mock>=2.0 # BSD
oauthlib>=0.6 # BSD oauthlib>=0.6 # BSD
oslosphinx>=4.7.0 # Apache-2.0 openstackdocstheme>=1.11.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0
requests-mock>=1.1 # Apache-2.0 requests-mock>=1.1 # Apache-2.0