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

Change-Id: I7382e562d05010938377815e3dfa37c84d1d485d
Andreas Jaeger 2020-05-23 18:04:31 +02:00
parent 49fc8d9e78
commit 27aa53d832
3 changed files with 10 additions and 20 deletions

View File

@ -1,12 +1,12 @@
# 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.
openstackdocstheme>=1.20.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,!=2.1.0;python_version>='3.4' # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
sphinxcontrib-apidoc>=0.2.1 # BSD
# releasenotes
reno>=2.5.0 # Apache-2.0
reno>=3.1.0 # Apache-2.0
# PDF Docs
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

@ -55,16 +55,6 @@ master_doc = 'index'
# General information about the project.
copyright = u'2017-2019, 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.
# Version info
from octavia_dashboard.version import version_info as octavia_dash_version
release = octavia_dash_version.release_string()
# The short X.Y version.
version = octavia_dash_version.version_string()
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@ -73,11 +63,12 @@ add_function_parentheses = True
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# openstackdocstheme options
repository_name = 'openstack/octavia-dashboard'
use_storyboard = True
openstackdocs_repo_name = 'openstack/octavia-dashboard'
openstackdocs_pdf_link = True
openstackdocs_use_storyboard = True
apidoc_output_dir = 'contributor/modules'
apidoc_module_dir = '../../octavia_dashboard'

View File

@ -48,9 +48,8 @@ extensions = [
# openstackdocstheme options
repository_name = 'openstack/octavia-dashboard'
bug_project = '909'
bug_tag = 'doc'
openstackdocs_repo_name = 'openstack/octavia-dashboard'
openstackdocs_use_storyboard = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -81,7 +80,7 @@ author = u'Octavia Developers'
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# If true, `todo` and `todoList` produce output, else they produce nothing.
# todo_include_todos = False