diff --git a/doc/source/conf.py b/doc/source/conf.py index 8fc3eaa939..0ed6919581 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -17,6 +17,8 @@ import sys import os import warnings +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. @@ -67,7 +69,7 @@ master_doc = 'index' # General information about the project. project = u'manila' -copyright = u'2010-present, OpenStack, LLC' +copyright = u'2010-present, Manila contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -79,6 +81,28 @@ release = version_info.release_string() # The short X.Y version. version = version_info.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 = u'http://git.openstack.org/cgit/openstack/manila/tree/doc/source' +git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" +gitsha = os.popen(git_cmd).read().strip('\n') +bug_tag = u'docs' +# source tree +pwd = os.getcwd() +html_context = { + "pwd": pwd, + "gitsha": gitsha, + "bug_tag": bug_tag, + "giturl": giturl, + "bug_project": "manila", +} + + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None @@ -132,19 +156,19 @@ man_pages = [ # -- Options for HTML output -------------------------------------------------- -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -# html_theme_path = ["."] -# html_theme = '_theme' +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'openstackdocs' + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = [openstackdocstheme.get_html_theme_path()] + # 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 # documentation. html_theme_options = {} -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None @@ -226,8 +250,8 @@ htmlhelp_basename = 'maniladoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Manila.tex', u'Manila Documentation', - u'Anso Labs, LLC', 'manual'), + ('index', 'Manila.tex', u'Manila Developer Documentation', + u'Manila contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/test-requirements.txt b/test-requirements.txt index d2620f1948..4dea62a9f4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,6 +13,7 @@ mock>=1.2 # BSD iso8601>=0.1.11 # MIT oslotest>=1.10.0 # Apache-2.0 oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 +openstackdocstheme>=1.0.3 # Apache-2.0 # Do not remove 'PyMySQL' and 'psycopg2' dependencies. They are used # by oslo_db lib for running MySQL and PostgreSQL DB migration tests.