From bdc26f13037131c714d84fe6085abff0bf0d06c9 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 22 Jun 2017 16:06:19 -0400 Subject: [PATCH] switch from oslosphinx to openstackdocstheme Depends-On: Ifc5512c0e2373cf3387e0e0498268eab092e52bb Change-Id: I58acb2cc35d33af586201a4667d82388a51987d5 Signed-off-by: Doug Hellmann --- doc/source/conf.py | 20 ++++++++++++++------ doc/source/index.rst | 3 +-- test-requirements.txt | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f0a78ec..d895525 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -9,13 +9,18 @@ sys.path.insert(0, 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'] -# make oslosphinx optional to not increase the needed dependencies +# make openstackdocstheme optional to not increase the needed dependencies try: - import oslosphinx + import openstackdocstheme + extensions.append('openstackdocstheme') except ImportError: - pass -else: - extensions.append('oslosphinx') + openstackdocstheme = None + +# openstackdocstheme options +repository_name = 'openstack/pbr' +bug_project = 'pbr' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -50,7 +55,10 @@ exclude_trees = [] # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' +if openstackdocstheme is not None: + html_theme = 'openstackdocs' +else: + html_theme = 'default' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/doc/source/index.rst b/doc/source/index.rst index 309ff71..8181cd7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -36,8 +36,7 @@ Contents: reference/index contributor/index -Indices and tables -================== +.. rubric:: Indices and tables * :ref:`genindex` * :ref:`modindex` diff --git a/test-requirements.txt b/test-requirements.txt index 9df6553..ba59354 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,8 +6,8 @@ fixtures>=3.0.0 # Apache-2.0/BSD hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 mock>=2.0 # BSD python-subunit>=0.0.18 # Apache-2.0/BSD -sphinx!=1.6.1,>=1.5.1 # BSD -oslosphinx>=4.7.0 # Apache-2.0 +sphinx>=1.6.2 # BSD +openstackdocstheme>=1.11.0 # Apache-2.0 six>=1.9.0 # MIT testrepository>=0.0.18 # Apache-2.0/BSD testresources>=0.2.4 # Apache-2.0/BSD