From 27aa53d832e143598b6d5d5b6d46d3232d1dba10 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 23 May 2020 18:04:31 +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: I7382e562d05010938377815e3dfa37c84d1d485d --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 17 ++++------------- releasenotes/source/conf.py | 7 +++---- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 0513dbcf..9abc1cfa 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,12 +1,12 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.20.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2,!=2.1.0;python_version>='3.4' # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-apidoc>=0.2.1 # BSD # releasenotes -reno>=2.5.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 # PDF Docs sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index ae4a85a2..1c11a34d 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -55,16 +55,6 @@ master_doc = 'index' # General information about the project. copyright = u'2017-2019, OpenStack Foundation' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# Version info -from octavia_dashboard.version import version_info as octavia_dash_version -release = octavia_dash_version.release_string() -# The short X.Y version. -version = octavia_dash_version.version_string() - # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -73,11 +63,12 @@ add_function_parentheses = True add_module_names = True # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # openstackdocstheme options -repository_name = 'openstack/octavia-dashboard' -use_storyboard = True +openstackdocs_repo_name = 'openstack/octavia-dashboard' +openstackdocs_pdf_link = True +openstackdocs_use_storyboard = True apidoc_output_dir = 'contributor/modules' apidoc_module_dir = '../../octavia_dashboard' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index f35e9d38..3967eccc 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -48,9 +48,8 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/octavia-dashboard' -bug_project = '909' -bug_tag = 'doc' +openstackdocs_repo_name = 'openstack/octavia-dashboard' +openstackdocs_use_storyboard = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -81,7 +80,7 @@ author = u'Octavia Developers' exclude_patterns = [] # 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