From 9c94986c9e01ae8de428a7d0adfc15f0b05d5521 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 13:57:32 +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: Ieaaff8278e93f85bd711a340f9621ae18841e720 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 15 ++++++--------- releasenotes/source/conf.py | 14 +++++--------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 598dd8aa49..a5a208c937 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,6 @@ -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-httpdomain>=1.3.0 # BSD sphinxcontrib-blockdiag>=1.5.4 # 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>=1.18.1 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 51bcb90e40..b1b610b70e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -93,7 +93,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 = [] @@ -111,9 +111,11 @@ nitpicky = False html_theme = 'openstackdocs' # openstackdocstheme options -repository_name = 'openstack/ceilometer' -bug_project = 'ceilometer' -bug_tag = '' +openstackdocs_repo_name = 'openstack/ceilometer' +openstackdocs_pdf_link = True +openstackdocs_auto_name = False +openstackdocs_bug_project = 'ceilometer' +openstackdocs_bug_tag = '' # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] @@ -139,11 +141,6 @@ bug_tag = '' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# Must set this variable to include year, month, day, hours, and minutes. -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 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 5324e8caee..2cd1441337 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -95,7 +95,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 = [] @@ -111,9 +111,10 @@ pygments_style = 'sphinx' html_theme = 'openstackdocs' # openstackdocstheme options -repository_name = 'openstack/ceilometer' -bug_project = 'ceilometer' -bug_tag = '' +openstackdocs_repo_name = 'openstack/ceilometer' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'ceilometer' +openstackdocs_bug_tag = '' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -149,11 +150,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. -# Must set this variable to include year, month, day, hours, and minutes. -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