From 7f1a8c1c3edb532c1cc69fba74055ba58117b21c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 19 May 2020 08:40:52 +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. Set openstackdocs_auto_version to not auto-version the documents. Set openstackdocs_auto_name to use 'project' as name. 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. 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. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I26887b175b9c1ced7347289b7d5d4f57a20ec36a --- doc/requirements.txt | 4 ++-- doc/source/conf.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 6ca2d60eaa..ffce3ff74c 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,8 +2,8 @@ pbr>=2.0.0,!=2.1.0 Pygments docutils -sphinx>=2.0.0,!=2.1.0 -openstackdocstheme>=2.0.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 nwdiag blockdiag sphinxcontrib-blockdiag diff --git a/doc/source/conf.py b/doc/source/conf.py index 56043ba6f7..2e17da17f8 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,9 +30,15 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.nwdiag' ] # openstackdocstheme options -repository_name = 'openstack-dev/devstack' -bug_project = 'devstack' -bug_tag = '' +openstackdocs_repo_name = 'openstack-dev/devstack' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'devstack' +openstackdocs_bug_tag = '' +openstackdocs_auto_name = False +# This repo is not tagged, so don't set versions +openstackdocs_auto_version = False +version = '' +release = '' todo_include_todos = True @@ -81,7 +87,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 = ['DevStack-doc.']