Switch to newer openstackdocstheme and reno versions

Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I4e3fe772adffbd70d55ce1b73d9161a6de5b9c11
This commit is contained in:
Andreas Jaeger 2020-05-21 16:20:23 +02:00
parent 3c1250a19d
commit 2009e61335
4 changed files with 17 additions and 50 deletions

View File

@ -25,10 +25,6 @@
import os
import sys
import pbr.version
version_info = pbr.version.VersionInfo('placement')
sys.path.insert(0, os.path.abspath('../'))
extensions = [
@ -53,20 +49,12 @@ project = u'Placement API Reference'
copyright = u'2010-present, OpenStack Foundation'
# openstackdocstheme options
repository_name = 'openstack/placement'
use_storyboard = True
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
openstackdocs_repo_name = 'openstack/placement'
openstackdocs_auto_name = False
openstackdocs_use_storyboard = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# -- Options for HTML output --------------------------------------------------
@ -81,10 +69,6 @@ html_theme_options = {
"sidebar_mode": "toc",
}
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# -- Options for LaTeX output -------------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
@ -97,6 +81,6 @@ latex_documents = [
# -- Options for openstackdocstheme -------------------------------------------
openstack_projects = [
openstackdocs_projects = [
'placement',
]

View File

@ -1,15 +1,15 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.3 # BSD
sphinx>=2.0.0,!=2.1.0 # BSD
sphinxcontrib-actdiag>=0.8.5 # BSD
sphinxcontrib-seqdiag>=0.8.4 # BSD
sphinx-feature-classification>=0.2.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
openstackdocstheme>=1.30.0 # Apache-2.0
openstackdocstheme>=2.2.1 # Apache-2.0
# releasenotes
reno>=2.5.0 # Apache-2.0
reno>=3.1.0 # Apache-2.0
# redirect tests in docs
whereto>=0.3.0 # Apache-2.0

View File

@ -19,11 +19,6 @@
import os
import sys
import pbr.version
version_info = pbr.version.VersionInfo('placement')
# 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.
@ -52,8 +47,9 @@ extensions = ['sphinx.ext.autodoc',
]
# openstackdocstheme options
repository_name = 'openstack/placement'
use_storyboard = True
openstackdocs_repo_name = 'openstack/placement'
openstackdocs_pdf_link = True
openstackdocs_use_storyboard = True
config_generator_config_file = '../../etc/placement/config-generator.conf'
sample_config_basename = '_static/placement'
@ -78,18 +74,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'placement'
copyright = u'2010-present, OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = False
@ -99,7 +85,7 @@ add_module_names = False
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['placement.']
@ -116,10 +102,6 @@ html_theme = 'openstackdocs'
html_static_path = ['_static']
html_extra_path = ['_extra']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# -- Options for LaTeX output -------------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
@ -147,7 +129,7 @@ smartquotes_excludes = {'builders': ['latex']}
# -- Options for openstackdocstheme -------------------------------------------
# keep this ordered to keep mriedem happy
openstack_projects = [
openstackdocs_projects = [
'neutron',
'nova',
'oslo.versionedobjects',

View File

@ -49,8 +49,9 @@ project = u'Placement Release Notes'
copyright = u'2018, Placement developers'
author = u'OpenStack'
# openstackdocstheme options
repository_name = 'openstack/placement'
use_storyboard = True
openstackdocs_repo_name = 'openstack/placement'
openstackdocs_auto_name = False
openstackdocs_use_storyboard = True
# The language for content autogenerated by Sphinx. Refer to documentation
@ -66,7 +67,7 @@ language = None
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# -- Options for HTML output -------------------------------------------------