From 3c4e47f05004e70a1631f101ac132349e2e33325 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 2 Jun 2020 19:08:42 +0200 Subject: [PATCH] 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: Ia39d9da11dacaff56c97367a30c0ace7385c7128 --- deploy-guide/source/conf.py | 12 ++++-------- doc/requirements.txt | 6 +++--- doc/source/conf.py | 13 +++++-------- releasenotes/source/conf.py | 11 ++++------- 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/deploy-guide/source/conf.py b/deploy-guide/source/conf.py index a8dda590eb..66bc90892b 100644 --- a/deploy-guide/source/conf.py +++ b/deploy-guide/source/conf.py @@ -114,9 +114,9 @@ source_suffix = '.rst' master_doc = 'index' # openstackdocstheme options -repository_name = 'openstack/' + target_name -bug_project = 'openstack-ansible' -bug_tag = '' +openstackdocs_repo_name = 'openstack/' + target_name +openstackdocs_bug_project = 'openstack-ansible' +openstackdocs_bug_tag = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -196,10 +196,6 @@ html_theme = 'openstackdocs' # directly to the root of the documentation. # html_extra_path = [] -# 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' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True @@ -305,7 +301,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ (master_doc, target_name, - title, author, bug_project, + title, author, openstackdocs_bug_project, description, category), ] diff --git a/doc/requirements.txt b/doc/requirements.txt index 7a5df4eada..d6c48ba9ce 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,9 +3,9 @@ # process, which may cause wedges in the gate later. # this is required for the docs build jobs -sphinx>=1.8.0,!=2.1.0 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD -openstackdocstheme>=1.29.2 # Apache-2.0 -reno>=2.11.3 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 doc8>=0.8.0 # Apache-2.0 bashate>=0.6.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 2ce87b6a1c..3ea9348113 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -128,10 +128,11 @@ source_suffix = '.rst' master_doc = 'index' # openstackdocstheme options -repository_name = 'openstack/' + target_name +openstackdocs_repo_name = 'openstack/' + target_name +openstackdocs_pdf_link = True # The bug project is always the same for all our repos -bug_project = 'openstack-ansible' -bug_tag = '' +openstackdocs_bug_project = 'openstack-ansible' +openstackdocs_bug_tag = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -215,10 +216,6 @@ html_static_path = ['_static'] # directly to the root of the documentation. # html_extra_path = [] -# 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' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True @@ -326,7 +323,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ (master_doc, target_name, - title, author, bug_project, + title, author, openstackdocs_bug_project, description, category), ] diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 30bca0eaba..1a1e817a6d 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -74,9 +74,10 @@ release = '' # The short X.Y version. version = '' # openstackdocstheme options -repository_name = 'openstack/' + target_name -bug_project = project.lower() -bug_tag = '' +openstackdocs_repo_name = 'openstack/' + target_name +openstackdocs_auto_name = False +openstackdocs_bug_project = project.lower() +openstackdocs_bug_tag = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -157,10 +158,6 @@ html_static_path = ['_static'] # directly to the root of the documentation. # html_extra_path = [] -# 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' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True