From f1048c2f60865601ec4f23d5c5cc83ed022f1c5c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 30 May 2020 15:54:07 +0200 Subject: [PATCH] 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 --- doc/source/conf.py | 18 +++++++++--------- requirements.txt | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index ecc4053..6d7a648 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,7 +12,6 @@ # serve to show the default. import datetime -import subprocess import sys import os @@ -38,7 +37,7 @@ extensions = ['redirect', ] # 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' todo_include_todos = True @@ -91,11 +90,18 @@ 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 = ['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 ---------------------------------------------- man_pages = [] @@ -129,12 +135,6 @@ html_theme = 'openstackdocs' # pixels large. #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 # typographically correct entities. #html_use_smartypants = True diff --git a/requirements.txt b/requirements.txt index 5131bff..33888af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # process, which may cause wedges in the gate later. 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 yasfb>=0.8.0 -openstackdocstheme>=1.19.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0