summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVan Hung Pham <hungpv@vn.fujitsu.com>2017-06-28 13:37:32 +0700
committerAndreas Jaeger <aj@suse.com>2017-07-02 09:27:05 +0200
commitbfb5759a53f15de1a254a7371d2d32f7adb7bb6a (patch)
tree247c30d2c56fe112c20133ae5bf92cf845e285f8
parent2d18ecdf4b099d1f09f092bb57c0132be5e4d44d (diff)
downloadswift-bfb5759a53f15de1a254a7371d2d32f7adb7bb6a.tar.gz
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
-rw-r--r--doc/source/conf.py24
-rw-r--r--doc/source/index.rst1
-rw-r--r--releasenotes/source/conf.py19
-rw-r--r--test-requirements.txt5
4 files changed, 25 insertions, 24 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index ec93ed1b7..72ab3b9a3 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -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 = ''
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 27afd5b1f..58f8175c2 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -14,6 +14,7 @@
License for the specific language governing permissions and limitations
under the License.
+=================================
Welcome to Swift's documentation!
=================================
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index acb99a3cf..5133ed714 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -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 = ''
diff --git a/test-requirements.txt b/test-requirements.txt
index 5b944ec54..968571a23 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -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