Merge "Switch from oslosphinx to openstackdocstheme"

This commit is contained in:
Jenkins
2017-07-14 09:31:07 +00:00
committed by Gerrit Code Review
3 changed files with 18 additions and 33 deletions

View File

@@ -15,7 +15,6 @@ import os
import subprocess
import sys
import openstackdocstheme
from senlin.version import version_info as senlin_version
@@ -29,10 +28,15 @@ extensions = [
'sphinx.ext.todo',
'sphinx.ext.graphviz',
'sphinx.ext.intersphinx',
'oslosphinx',
'openstackdocstheme',
'oslo_config.sphinxext',
]
# openstackdocstheme options
repository_name = 'openstack/senlin'
bug_project = 'senlin'
bug_tag = ''
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
@@ -62,30 +66,6 @@ release = senlin_version.version_string_with_vcs()
# The short X.Y version.
version = senlin_version.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. Extracted from git log.
# bug_tag: Tag for categorizing the bug. Must be set manually.
# bug_project: Launchpad project to file bugs against.
# These variables are passed to the logabug code via html_context.
giturl = u'https://git.openstack.org/cgit/openstack/senlin/tree/doc/source'
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h", "--date=local",
"-n1"]
gitsha = subprocess.Popen(git_cmd,
stdout=subprocess.PIPE).communicate()[0]
bug_tag = "docs"
# source tree
pwd = os.getcwd()
# html_context allows us to pass arbitrary values into the html template
html_context = {"pwd": pwd,
"gitsha": gitsha,
"bug_tag": bug_tag,
"giturl": giturl,
"bug_project": "senlin"}
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@@ -105,11 +85,13 @@ pygments_style = 'sphinx'
html_theme = 'openstackdocs'
# Add any paths that contain custom themes here, relative to this directory
html_theme_path = [openstackdocstheme.get_html_theme_path()]
#html_theme_path = []
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).

View File

@@ -37,10 +37,15 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
# openstackdocstheme options
repository_name = 'openstack/senlin'
bug_project = 'senlin'
bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -111,7 +116,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'openstackdocs'
# 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
@@ -149,7 +154,7 @@ html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -157,7 +162,6 @@ html_static_path = ['_static']
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}

View File

@@ -7,7 +7,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
flake8<2.6.0,>=2.5.4 # MIT
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
mock>=2.0 # BSD
openstackdocstheme>=1.11.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
PyMySQL>=0.7.6 # MIT License
@@ -17,8 +16,8 @@ testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
# Documentation
openstackdocstheme>=1.11.0 # Apache-2.0
os-api-ref>=1.0.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
sphinx>=1.6.2 # BSD
reno!=2.3.1,>=1.8.0 # Apache-2.0