Cleanup conf.py

Adapt for current theme options, remove obsolete code.

Change-Id: I900fa3914463147acaf40e81f54f2f80abcac048
This commit is contained in:
Andreas Jaeger 2017-07-04 13:47:08 +02:00
parent af22063ebf
commit ab2b99c978
3 changed files with 8 additions and 23 deletions

View File

@ -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
# "<project> v<release> 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

View File

@ -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'

View File

@ -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