From 68b8f5327b8a2a7b3ff3ce37781d4f819dd7cb91 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 20:19:18 +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: If5b3ea5c50a91f623b0dd4d1dd347ee8a6b90290 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 15 ++++++--------- releasenotes/source/conf.py | 13 +++++-------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 6f8e3805..2123e2ea 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,4 @@ -sphinx>=1.8.0,!=2.1.0 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD -reno>=2.5.0 # Apache-2.0 -openstackdocstheme>=1.18.1 # Apache-2.0 +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 6e6d89f5..29813ad3 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -48,7 +48,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 -------------------------------------------------- @@ -60,11 +60,6 @@ html_theme = 'openstackdocs' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # Add any paths that contain "extra" files, such as .htaccess or # robots.txt. html_extra_path = ['_extra'] @@ -90,6 +85,8 @@ latex_use_xindy = False #intersphinx_mapping = {'https://docs.python.org/3/': None} # -- Options for openstackdocstheme ------------------------------------------- -repository_name = 'openstack/castellan' -bug_project = 'castellan' -bug_tag = '' +openstackdocs_repo_name = 'openstack/castellan' +openstackdocs_pdf_link = True +openstackdocs_auto_name = False +openstackdocs_bug_project = 'castellan' +openstackdocs_bug_tag = '' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index cbbe9304..1dde6ae9 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -52,9 +52,10 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -repository_name = 'openstack/castellan' -bug_project = 'castellan' -bug_tag = 'doc' +openstackdocs_repo_name = 'openstack/castellan' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'castellan' +openstackdocs_bug_tag = 'doc' project = u'Castellan Release Notes' copyright = u'2017, Castellan Developers' @@ -95,7 +96,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 = [] @@ -144,10 +145,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. -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