From a7f100e050f8cb304c2c73582a1f49d0fa8564a0 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 3 Jul 2017 16:22:16 +0800 Subject: [PATCH] Fix openstackdocstheme settings To use openstackdocstheme 1.11.0 properly, this patch fixes some settings according to follow[0]. [0]https://docs.openstack.org/openstackdocstheme/latest/ Change-Id: I19b48320925e49782b6e2afce13a277165669dfa --- doc/source/conf.py | 22 +++++----------------- releasenotes/source/conf.py | 9 +++++++-- test-requirements.txt | 1 - 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 797f6f4..bf788a5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,7 +22,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import openstackdocstheme import pbr.version import os @@ -40,8 +39,8 @@ import os # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'openstackdocstheme', 'sphinx.ext.autodoc', - 'oslosphinx', 'sphinxmark' ] @@ -83,22 +82,11 @@ release = version_info.version_string_with_vcs() # The short X.Y version. version = version_info.canonical_version_string() -# A few variables have to be set for the log-a-bug feature. -# giturl: The location of conf.py on Git. Must be set manually. -# gitsha: The SHA checksum of the bug description. Automatically extracted from git log. -# bug_tag: Tag for categorizing the bug. Must be set manually. -# These variables are passed to the logabug code via html_context. -giturl = ("https://git.openstack.org/cgit/openstack/{0}" - "/tree/doc/source").format(target_name) -git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" -gitsha = os.popen(git_cmd).read().strip('\n') +# openstackdocstheme options +repository_name = 'openstack/' + target_name bug_project = project.lower() -bug_title = "Documentation bug" -html_context = {"gitsha": gitsha, "giturl": giturl, - "bug_tag": "docs", "bug_title": bug_title, - "bug_project": bug_project } +bug_tag = '' -# The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. @@ -155,7 +143,7 @@ html_theme = 'openstackdocs' # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [openstackdocstheme.get_html_theme_path()] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 49f11c8..05eafd4 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -23,7 +23,6 @@ # serve to show the default. import pbr.version -import openstackdocstheme # 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 @@ -39,6 +38,7 @@ import openstackdocstheme # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'openstackdocstheme', 'reno.sphinxext', ] @@ -78,6 +78,11 @@ release = version_info.version_string_with_vcs() # The short X.Y version. version = version_info.canonical_version_string() +# openstackdocstheme options +repository_name = 'openstack/' + target_name +bug_project = project.lower() +bug_tag = '' + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None @@ -129,7 +134,7 @@ html_theme = 'openstackdocs' # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [openstackdocstheme.get_html_theme_path()] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/test-requirements.txt b/test-requirements.txt index 36dfb0c..a4923af 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,7 +10,6 @@ ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD # this is required for the docs build jobs sphinx>=1.6.2 # BSD -oslosphinx>=4.7.0 # Apache-2.0 openstackdocstheme>=1.11.0 # Apache-2.0 doc8 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0