From 138375ea2349f203833b243c38068053118c1464 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 14:38:12 +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: Ibf877ecf4ee043017d0ca219595cee859b7092dc --- api-guide/source/conf.py | 9 +++++---- doc/requirements.txt | 4 ++-- doc/source/conf.py | 10 ++++++---- releasenotes/source/conf.py | 9 +++++---- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/api-guide/source/conf.py b/api-guide/source/conf.py index e8a10c9ff..80c402da3 100644 --- a/api-guide/source/conf.py +++ b/api-guide/source/conf.py @@ -46,9 +46,10 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. project = u'Key Manager API Guide' -bug_tag = u'api-guide' -repository_name = 'openstack/barbican' -bug_project = 'barbican' +openstackdocs_bug_tag = u'api-guide' +openstackdocs_repo_name = 'openstack/barbican' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'barbican' copyright = u'2016, OpenStack contributors' @@ -83,7 +84,7 @@ exclude_patterns = [] # 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 = [] diff --git a/doc/requirements.txt b/doc/requirements.txt index 3a67f2db8..05329aa36 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,8 +2,8 @@ sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-httpdomain>=1.3.0 # BSD sphinxcontrib-blockdiag>=1.5.4 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD -reno>=2.5.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 os-api-ref>=1.5.0 # Apache-2.0 -openstackdocstheme>=2.0.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 castellan >= 0.17 # Apache-2.0 pykmip>=0.7.0 # Apache 2.0 License diff --git a/doc/source/conf.py b/doc/source/conf.py index e6a7adabf..faab65f24 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,9 +51,11 @@ master_doc = 'index' # General information about the project. project = u'Barbican' copyright = u'2014, OpenStack Foundation' -repository_name = 'openstack/barbican' -bug_project = 'barbican' -bug_tag = '' +openstackdocs_repo_name = 'openstack/barbican' +openstackdocs_pdf_link = True +openstackdocs_auto_name = False +openstackdocs_bug_project = 'barbican' +openstackdocs_bug_tag = '' # Add any paths that contain "extra" files, such as .htaccess or # robots.txt. @@ -67,7 +69,7 @@ add_function_parentheses = True add_module_names = True # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # -- Options for HTML output -------------------------------------------------- diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index dbf48d56c..eb84d9d46 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -56,9 +56,10 @@ master_doc = 'index' # General information about the project. project = u'Barbican Release Notes' copyright = u'2015, Barbican Developers' -repository_name = 'openstack/barbican' -bug_project = 'barbican' -bug_tag = '' +openstackdocs_repo_name = 'openstack/barbican' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'barbican' +openstackdocs_bug_tag = '' # Release notes are version independent. # The short X.Y version. @@ -96,7 +97,7 @@ exclude_patterns = [] # 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 = []