Merge "Switch from oslosphinx to openstackdocstheme"

This commit is contained in:
Jenkins 2017-07-06 18:16:43 +00:00 committed by Gerrit Code Review
commit 37a1935198
4 changed files with 25 additions and 24 deletions

View File

@ -29,9 +29,7 @@
import datetime import datetime
import os import os
from swift import __version__ from swift import __version__
import subprocess
import sys import sys
import warnings
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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 # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.todo',
'sphinx.ext.ifconfig', 'oslosphinx'] 'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'openstackdocstheme']
todo_include_todos = True todo_include_todos = True
# Add any paths that contain templates here, relative to this directory. # 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'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme = 'default' # html_theme = 'default'
# html_theme_path = ["."] # html_theme_path = ["."]
# 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
@ -159,14 +159,7 @@ modindex_common_prefix = ['swift.']
# 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'
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.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".')
# 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.
@ -235,3 +228,8 @@ latex_documents = [
# If false, no module index is generated. # If false, no module index is generated.
# latex_use_modindex = True # 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 License for the specific language governing permissions and limitations
under the License. under the License.
=================================
Welcome to Swift's documentation! 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 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'oslosphinx',
'reno.sphinxext', 'reno.sphinxext',
'openstackdocstheme',
] ]
# Add any paths that contain templates here, relative to this directory. # 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 # 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 = 'openstackdocs'
html_theme = 'default'
# 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
@ -178,11 +177,10 @@ html_theme = 'default'
# #
# html_extra_path = [] # html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# bottom, using the given strftime format. # using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'. # html_last_updated_fmt = '%b %d, %Y'
# html_last_updated_fmt = '%Y-%m-%d %H:%M'
# html_last_updated_fmt = None
# 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.
@ -355,3 +353,8 @@ htmlhelp_basename = 'SwiftReleaseNotesdoc'
# texinfo_no_detailmenu = False # texinfo_no_detailmenu = False
locale_dirs = ['locale/'] 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 nose # LGPL
nosexcover # BSD nosexcover # BSD
nosehtmloutput>=0.0.3 # Apache-2.0 nosehtmloutput>=0.0.3 # Apache-2.0
openstackdocstheme>=1.5.0 # Apache-2.0 sphinx>=1.6.2 # BSD
oslosphinx>=4.7.0 # Apache-2.0 openstackdocstheme>=1.11.0 # Apache-2.0
sphinx>=1.5.1 # BSD
os-api-ref>=1.0.0 # Apache-2.0 os-api-ref>=1.0.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0 os-testr>=0.8.0 # Apache-2.0
mock>=2.0 # BSD mock>=2.0 # BSD