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: I47d858fafd5d57f00cab9d7a4b87950320febf70
This commit is contained in:
Van Hung Pham 2017-06-30 15:36:37 +07:00
parent 68d46529c6
commit bdfa6d59cc
2 changed files with 10 additions and 8 deletions

View File

@ -39,6 +39,7 @@ extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.coverage',
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'openstackdocstheme',
] ]
todo_include_todos = True todo_include_todos = True
@ -116,6 +117,7 @@ modindex_common_prefix = ['ldappool.']
# 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 +150,7 @@ modindex_common_prefix = ['ldappool.']
# 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:
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.
@ -228,3 +224,8 @@ latex_documents = [
intersphinx_mapping = { intersphinx_mapping = {
'python': ('http://docs.python.org/', None), 'python': ('http://docs.python.org/', None),
} }
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/ldappool'
bug_project = 'ldappool'
bug_tag = ''

View File

@ -8,7 +8,8 @@ flake8-docstrings==0.2.1.post1 # MIT
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
sphinx!=1.6.1,>=1.5.1 # BSD sphinx>=1.6.2 # BSD
openstackdocstheme>=1.11.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD testrepository>=0.0.18 # Apache-2.0/BSD
testresources>=0.2.4 # Apache-2.0/BSD testresources>=0.2.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT testtools>=1.4.0 # MIT