Switch from oslosphinx to openstackdocstheme

As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.

Fix one display problem with wrong section markup in the index file.

[0]https://review.openstack.org/#/c/472275/

Change-Id: Ide31218a7f37ba5d959de99cab48fc6513bf426f
This commit is contained in:
Van Hung Pham 2017-06-28 13:37:32 +07:00 committed by Andreas Jaeger
parent 2d18ecdf4b
commit bfb5759a53
4 changed files with 25 additions and 24 deletions

View File

@ -29,9 +29,7 @@
import datetime
import os
from swift import __version__
import subprocess
import sys
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
@ -44,8 +42,10 @@ sys.path.extend([os.path.abspath('../swift'), os.path.abspath('..'),
# 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',
'sphinx.ext.todo', 'sphinx.ext.coverage',
'sphinx.ext.ifconfig', 'oslosphinx']
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'openstackdocstheme']
todo_include_todos = True
# Add any paths that contain templates here, relative to this directory.
@ -125,7 +125,7 @@ modindex_common_prefix = ['swift.']
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme = 'default'
# 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
@ -159,14 +159,7 @@ modindex_common_prefix = ['swift.']
# 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 OSError:
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.
@ -235,3 +228,8 @@ latex_documents = [
# If false, no module index is generated.
# latex_use_modindex = True
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/swift'
bug_project = 'swift'
bug_tag = ''

View File

@ -14,6 +14,7 @@
License for the specific language governing permissions and limitations
under the License.
=================================
Welcome to Swift's documentation!
=================================

View File

@ -45,8 +45,8 @@ from swift import __version__
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'reno.sphinxext',
'openstackdocstheme',
]
# Add any paths that contain templates here, relative to this directory.
@ -135,8 +135,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
@ -178,11 +177,10 @@ html_theme = 'default'
#
# html_extra_path = []
# 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'.
#
# html_last_updated_fmt = None
# 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.
@ -355,3 +353,8 @@ htmlhelp_basename = 'SwiftReleaseNotesdoc'
# texinfo_no_detailmenu = False
locale_dirs = ['locale/']
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/swift'
bug_project = 'swift'
bug_tag = ''

View File

@ -8,9 +8,8 @@ coverage>=3.6 # Apache-2.0
nose # LGPL
nosexcover # BSD
nosehtmloutput>=0.0.3 # Apache-2.0
openstackdocstheme>=1.5.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
sphinx>=1.5.1 # BSD
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.11.0 # Apache-2.0
os-api-ref>=1.0.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
mock>=2.0 # BSD