Switch to newer openstackdocstheme version

Switch to openstackdocstheme 2.2.1 version. Using
this version 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: Iac80c4e5270632c6d51590f40d3ca474bc59302a
This commit is contained in:
Andreas Jaeger 2020-05-30 15:54:07 +02:00
parent a16dc8757c
commit f1048c2f60
2 changed files with 11 additions and 11 deletions

View File

@ -12,7 +12,6 @@
# serve to show the default. # serve to show the default.
import datetime import datetime
import subprocess
import sys import sys
import os import os
@ -38,7 +37,7 @@ extensions = ['redirect',
] ]
# Feed configuration for yasfb # Feed configuration for yasfb
feed_base_url = 'http://specs.openstack.org/openstack/watcher-specs' feed_base_url = 'https://specs.openstack.org/openstack/watcher-specs'
feed_author = 'Watcher Team' feed_author = 'Watcher Team'
todo_include_todos = True todo_include_todos = True
@ -91,11 +90,18 @@ add_module_names = False
show_authors = False show_authors = False
# The name of the Pygments (syntax highlighting) style to use. # 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. # A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['watcher-specs.'] modindex_common_prefix = ['watcher-specs.']
#openstackdocstheme options
openstackdocs_repo_name = 'openstack/watcher-specs'
openstackdocs_pdf_link = True
openstackdocs_auto_name = False
openstackdocs_bug_project = 'watcher'
openstackdocs_bug_tag = ''
# -- Options for man page output ---------------------------------------------- # -- Options for man page output ----------------------------------------------
man_pages = [] man_pages = []
@ -129,12 +135,6 @@ html_theme = 'openstackdocs'
# pixels large. # pixels large.
#html_favicon = None #html_favicon = None
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True #html_use_smartypants = True

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
pbr>=2.0.0,!=2.1.0 # Apache-2.0 pbr>=2.0.0,!=2.1.0 # Apache-2.0
sphinx>=1.8.0,!=2.1.0 # BSD sphinx>=2.0.0,!=2.1.0 # BSD
testtools>=1.4.0 testtools>=1.4.0
yasfb>=0.8.0 yasfb>=0.8.0
openstackdocstheme>=1.19.0 # Apache-2.0 openstackdocstheme>=2.2.1 # Apache-2.0