From 4d84a3b4962530b561dc460db9427f7655726287 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 19 May 2020 07:43:45 +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. 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. 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. Set openstackdocs_auto_name to use 'project' 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. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html 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. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I8e6c4b1d09e5f56b505c6006ea048baf896444c3 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 9 ++++----- lower-constraints.txt | 2 +- releasenotes/source/conf.py | 13 +++++-------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index a25f225e..1489bcee 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,3 @@ -sphinx>=1.8.0,!=2.1.0 # BSD -openstackdocstheme>=1.32.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 23cc8f35..047daa84 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -11,9 +11,9 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = ['sphinx.ext.autodoc', 'openstackdocstheme'] # openstackdocstheme options -repository_name = 'openstack-dev/hacking' -bug_project = 'hacking' -bug_tag = '' +openstackdocs_repo_name = 'openstack/hacking' +openstackdocs_bug_project = 'hacking' +openstackdocs_bug_tag = '' # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -40,12 +40,11 @@ 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 -------------------------------------------------- html_theme = 'openstackdocs' -html_last_updated_fmt = '%Y-%m-%d %H:%M' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/lower-constraints.txt b/lower-constraints.txt index df296681..3850e192 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -20,7 +20,7 @@ python-mimeparse==1.6.0 python-subunit==1.0.0 pytz==2013.6 PyYAML==3.12 -reno==2.5.0 +reno==3.1.0 requests==2.14.2 snowballstemmer==1.2.1 stestr==2.0.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 2a7274ab..ce107f75 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -43,9 +43,10 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack-dev/hacking' -bug_project = 'hacking' -bug_tag = '' +openstackdocs_repo_name = 'openstack/hacking' +openstackdocs_bug_project = 'hacking' +openstackdocs_bug_tag = '' +openstackdocs_auto_name = False # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -99,7 +100,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 = [] @@ -148,10 +149,6 @@ html_theme = 'openstackdocs' # 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. -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