From ab2b99c978f96ac25255e5c7284020d393add5cb Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 4 Jul 2017 13:47:08 +0200 Subject: [PATCH] Cleanup conf.py Adapt for current theme options, remove obsolete code. Change-Id: I900fa3914463147acaf40e81f54f2f80abcac048 --- api-ref/source/conf.py | 25 +++++-------------------- doc/source/conf.py | 2 +- releasenotes/source/conf.py | 4 ++-- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index e4a4ee6..fcfece9 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -9,12 +9,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import subprocess import sys import os -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 # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -31,11 +28,12 @@ import openstackdocstheme extensions = [ 'os_api_ref', + 'openstackdocstheme' ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -65,21 +63,8 @@ version = '1.0' release = '1.0' # 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 = u'https://git.openstack.org/cgit/openstack/openstackdocstheme/tree/doc/source' -git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"] -# git might not be available during build (eg when building from an sdist) -try: - gitsha = subprocess.Popen( - git_cmd, stdout=subprocess.PIPE).communicate()[0].strip('\n') -except Exception: - gitsha = 'unknown' bug_tag = "doc-builds" - -html_context = {"gitsha": gitsha, "bug_tag": bug_tag, "giturl": giturl} +bug_project = 'openstack-doc-tools' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -139,7 +124,7 @@ html_theme_options = {"sidebar_dropdown": "api_ref", "sidebar_mode": "toc"} # 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". @@ -160,7 +145,7 @@ html_theme_path = [openstackdocstheme.get_html_theme_path()] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static/css'] +# html_static_path = ['_static/css'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/doc/source/conf.py b/doc/source/conf.py index 91a5162..9a4c82a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -44,7 +44,7 @@ bug_project = 'openstack-doc-tools' bug_tag = 'openstackdocstheme' # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index c7c499e..49e5850 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -40,7 +40,7 @@ extensions = [ ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +# templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -53,7 +53,7 @@ master_doc = 'index' # General information about the project. project = u'OpenStackdocstheme Release Notes' -copyright = u'2015, OpenStack Documentation team' +copyright = u'2017, OpenStack Documentation team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the