doc: use new config options of openstackdocstheme

The new simple configuration way was introduced in
openstackdocstheme 1.11.0. This commit introduces the new way.

Also drops unnecessary sphinx configurations like latex,
texinfo and manpages.

Change-Id: I587eb8cbd3e64c65dfc7247a01eca90af6adad4e
This commit is contained in:
Akihiro Motoki
2017-06-30 15:40:19 +09:00
parent 53e55938d9
commit 7790167f6f
2 changed files with 16 additions and 132 deletions

View File

@@ -1,21 +1,21 @@
# -*- coding: utf-8 -*-
#
import os
import openstackdocstheme
project = 'python-neutronclient'
# -- General configuration ---------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'reno.sphinxext',
'openstackdocstheme',
]
# openstackdocstheme options
repository_name = 'openstack/python-neutronclient'
bug_project = 'python-neutronclient'
bug_tag = 'doc'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -44,30 +44,5 @@ pygments_style = 'sphinx'
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
gitsha = os.popen("/usr/bin/git rev-parse HEAD").read()
giturl = ('https://git.openstack.org/cgit/openstack/%s/tree/doc/source'
% 'python-neutronclient')
html_context = {
'gitsha': gitsha,
'giturl': giturl,
'bug_project': 'python-neutronclient',
'bug_tag': 'doc',
}
html_last_updated_fmt = os.popen("git log --pretty=format:'%ad' "
"--date=format:'%Y-%m-%d %H:%M' -n1").read()
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author,
# documentclass [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
htmlhelp_basename = 'neutronclientdoc'

View File

@@ -29,10 +29,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
import os
import openstackdocstheme
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -43,8 +39,15 @@ import openstackdocstheme
# ones.
extensions = [
'reno.sphinxext',
'openstackdocstheme',
]
# openstackdocstheme options
repository_name = 'openstack/python-neutronclient'
bug_project = 'python-neutronclient'
bug_tag = 'doc'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -123,7 +126,7 @@ html_theme = 'openstackdocs'
# html_theme_options = {}
# 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".
@@ -195,99 +198,5 @@ html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename = 'NeutronReleaseNotesdoc'
gitsha = os.popen("/usr/bin/git rev-parse HEAD").read()
giturl = ('https://git.openstack.org/cgit/openstack/%s/tree/doc/source'
% 'python-neutronclient')
html_context = {
'gitsha': gitsha,
'giturl': giturl,
'bug_project': 'python-neutronclient',
'bug_tag': 'doc',
}
html_last_updated_fmt = os.popen("git log --pretty=format:'%ad' "
"--date=format:'%Y-%m-%d %H:%M' -n1").read()
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'NeutronClientReleaseNotes.tex',
u'Neutron Client Release Notes Documentation',
u'Neutron Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# If true, show page references after internal links.
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'neutronclientreleasenotes',
u'Neutron Client Release Notes Documentation',
[u'Neutron Developers'], 1)
]
# If true, show URL addresses after external links.
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'NeutronClientReleaseNotes',
u'Neutron Client Release Notes Documentation',
u'Neutron Developers', 'NeutronClientReleaseNotes',
'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']