From eef6ddd62d6bd4ab26ef6f7c564c2d818630c605 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 14:34:59 +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: I49a5a5876b0b995df0c3ce55fd517fa81bd79fd2 --- api-ref/source/conf.py | 8 ++++---- doc/requirements.txt | 4 ++-- doc/source/conf.py | 9 +++++---- releasenotes/source/conf.py | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index f7166fad..3fba5990 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -42,12 +42,12 @@ master_doc = 'index' copyright = u'2016-present, OpenStack Foundation' # openstackdocstheme options -repository_name = 'openstack/cyborg' -bug_project = 'cyborg' -bug_tag = 'api-ref' +openstackdocs_repo_name = 'openstack/cyborg' +openstackdocs_bug_project = 'cyborg' +openstackdocs_bug_tag = 'api-ref' # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # -- Options for HTML output -------------------------------------------------- diff --git a/doc/requirements.txt b/doc/requirements.txt index 71f4fe92..37137ab9 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,6 +7,6 @@ sphinxcontrib-httpdomain>=1.3.0 # BSD sphinxcontrib-pecanwsme>=0.2 # Apache-2.0 sphinxcontrib-seqdiag>=0.8.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.4.0 # Apache-2.0 -openstackdocstheme>=2.0.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 32674821..b13b4153 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -44,9 +44,10 @@ master_doc = 'index' copyright = u'2013, OpenStack Foundation' # openstackdocstheme options -repository_name = 'openstack/cyborg' -bug_project = 'cyborg' -bug_tag = '' +openstackdocs_repo_name = 'openstack/cyborg' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'cyborg' +openstackdocs_bug_tag = '' config_generator_config_file = '../../tools/config/cyborg-config-generator.conf' sample_config_basename = '_static/cyborg' @@ -64,7 +65,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 c76ec429..f7000797 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -15,9 +15,9 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/cyborg' -bug_project = 'openstack-cyborg' -bug_tag = '' +openstackdocs_repo_name = 'openstack/cyborg' +openstackdocs_bug_project = 'openstack-cyborg' +openstackdocs_bug_tag = '' # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: @@ -54,7 +54,7 @@ language = None exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False