From 288d663912009ffefbb89f207b81e0ac8649016a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 20:33: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: Iccb449e20174b973f83924659e1ee2db592a326f --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 18 ++++-------------- releasenotes/source/conf.py | 6 +++++- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 0663364..f41f72e 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,3 @@ -sphinx>=1.8.0 # BSD -reno!=2.3.1,>=1.8.0 # Apache-2.0 -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +reno>=3.1.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index cc8eb9b..08f2d6e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -26,8 +26,9 @@ try: except ImportError: openstackdocstheme = None -repository_name = 'openstack/tenks' -use_storyboard = True +openstackdocs_repo_name = 'openstack/tenks' +openstackdocs_pdf_link = True +openstackdocs_use_storyboard = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -44,19 +45,8 @@ master_doc = 'index' # General information about the project. copyright = u'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. -# -# The short X.Y version. -from tenks import version as tenks_version -# The full version, including alpha/beta/rc tags. -release = tenks_version.version_info.release_string() -# The short X.Y version. -version = tenks_version.version_info.version_string() - # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 3d1a895..fea6ba5 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -58,6 +58,10 @@ master_doc = 'index' project = u'Tenks Release Notes' copyright = u'{year}, The Tenks team'.format(year=datetime.date.today().year) +openstackdocs_repo_name = 'openstack/tenks' +openstackdocs_auto_name = False +openstackdocs_use_storyboard = True + # 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. @@ -97,7 +101,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 = []