summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Ardeois <cardeois@internap.com>2016-10-25 20:20:54 +0200
committerCorentin Ardeois <cardeois@internap.com>2016-10-25 20:20:54 +0200
commit33186289aa3d9e4a051c6fbc966fb4be61c3e1f8 (patch)
tree50f04e6fd5f963b57f495fe8272b41c3c06e7836
parentf137472a44c2e031fd849266afd8e976167cba09 (diff)
Update OpenStack documentation template
As we will upload documentation to developer.openstack.org, this patch switch sphinx template from 'osloshpinx' to 'openstackdocstheme' Change-Id: I8073e72c11117ec605dcc8441a0c091f030014f8
Notes
Notes (review): Code-Review+2: Michael Krotscheck <krotscheck@gmail.com> Code-Review+1: Dong Ma <winterma.dong@gmail.com> Code-Review+2: Vitaly Kramskikh <vkramskikh@mirantis.com> Workflow+1: Vitaly Kramskikh <vkramskikh@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 01 Nov 2016 10:38:22 +0000 Reviewed-on: https://review.openstack.org/390629 Project: openstack/js-openstack-lib Branch: refs/heads/master
-rw-r--r--bindep.txt2
-rw-r--r--doc/source/conf.py34
2 files changed, 28 insertions, 8 deletions
diff --git a/bindep.txt b/bindep.txt
index ff72551..4e78b72 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -30,7 +30,7 @@ python-devel [platform:rpm]
30python-libvirt [platform:dpkg] 30python-libvirt [platform:dpkg]
31python-lxml 31python-lxml
32python-sphinx [platform:dpkg] 32python-sphinx [platform:dpkg]
33python-oslosphinx [platform:dpkg] 33python-openstackdocstheme [platform:dpkg]
34python3-all-dev [platform:ubuntu-trusty] 34python3-all-dev [platform:ubuntu-trusty]
35python3-dev [platform:dpkg] 35python3-dev [platform:dpkg]
36python3-devel [platform:fedora] 36python3-devel [platform:fedora]
diff --git a/doc/source/conf.py b/doc/source/conf.py
index e43b65c..3e3099d 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -16,14 +16,15 @@ import datetime
16import os 16import os
17import sys 17import sys
18 18
19import openstackdocstheme
20
19sys.path.insert(0, os.path.abspath('../..')) 21sys.path.insert(0, os.path.abspath('../..'))
20# -- General configuration ---------------------------------------------------- 22# -- General configuration ----------------------------------------------------
21 23
22# Add any Sphinx extension module names here, as strings. They can be 24# Add any Sphinx extension module names here, as strings. They can be
23# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 25# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
24extensions = [ 26extensions = [
25 'sphinx.ext.autodoc', 27 'sphinx.ext.autodoc'
26 'oslosphinx'
27] 28]
28 29
29exclude_patterns = [ 30exclude_patterns = [
@@ -52,6 +53,24 @@ master_doc = 'index'
52project = u'js-openstack-lib' 53project = u'js-openstack-lib'
53copyright = u'%s, OpenStack Foundation' % datetime.date.today().year 54copyright = u'%s, OpenStack Foundation' % datetime.date.today().year
54 55
56# A few variables have to be set for the log-a-bug feature.
57# giturl: The location of conf.py on Git. Must be set manually.
58# gitsha: The SHA checksum of the bug description. Extracted from git log.
59# bug_tag: Tag for categorizing the bug. Must be set manually.
60# bug_project: Launchpad project to file bugs against.
61# These variables are passed to the logabug code via html_context.
62giturl = u'http://git.openstack.org/cgit/openstack/js-openstack-lib/tree/doc/source'
63git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
64gitsha = os.popen(git_cmd).read().strip('\n')
65bug_tag = "docs"
66# source tree
67pwd = os.getcwd()
68# html_context allows us to pass arbitrary values into the html template
69html_context = {"pwd": pwd,
70 "gitsha": gitsha,
71 "bug_tag": bug_tag,
72 "giturl": giturl}
73
55# If true, '()' will be appended to :func: etc. cross-reference text. 74# If true, '()' will be appended to :func: etc. cross-reference text.
56add_function_parentheses = True 75add_function_parentheses = True
57 76
@@ -64,11 +83,12 @@ pygments_style = 'sphinx'
64 83
65# -- Options for HTML output -------------------------------------------------- 84# -- Options for HTML output --------------------------------------------------
66 85
67# The theme to use for HTML and HTML Help pages. Major themes that come with 86# The theme to use for HTML and HTML Help pages. See the documentation for
68# Sphinx are currently 'default' and 'sphinxdoc'. 87# a list of builtin themes.
69# html_theme_path = ["."] 88html_theme = 'openstackdocs'
70# html_theme = '_theme' 89
71# html_static_path = ['static'] 90# Add any paths that contain custom themes here, relative to this directory.
91html_theme_path = [openstackdocstheme.get_html_theme_path()]
72 92
73# Output file base name for HTML help builder. 93# Output file base name for HTML help builder.
74htmlhelp_basename = '%sdoc' % project 94htmlhelp_basename = '%sdoc' % project