From ba18ac68530b4f596ac6152cf8d8b519e94c7c8d Mon Sep 17 00:00:00 2001 From: Iury Gregory Melo Ferreira Date: Thu, 21 May 2020 13:59:35 +0200 Subject: [PATCH] Switch to newer openstackdocstheme version Switch to openstackdocstheme 2.2.1 version. Using this version 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. 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: I24a681c65c4de50d654f139bc87bc321cb819b22 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 7 ++++++- releasenotes/source/conf.py | 8 +++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index d9027b7..db6dbac 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,3 @@ -openstackdocstheme>=1.20.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD +openstackdocstheme>=2.2.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 3535503..027df44 100644 --- 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 -------------------------------------------------- @@ -58,6 +58,11 @@ pygments_style = 'sphinx' html_theme = 'openstackdocs' # html_static_path = ['static'] +# openstackdocstheme options +openstackdocs_repo_name = 'openstack/ironic-prometheus-exporter' +openstackdocs_pdf_link = True +openstackdocs_use_storyboard = True + # Output file base name for HTML help builder. htmlhelp_basename = 'ironic_prometheus_exporter_doc' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index b52cab8..137cf86 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -47,9 +47,8 @@ extensions = [ ] -repository_name = 'openstack/ironic-prometheus-exporter' -use_storyboard = True - +openstackdocs_repo_name = 'openstack/ironic-prometheus-exporter' +openstackdocs_use_storyboard = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -65,7 +64,6 @@ master_doc = 'index' # -- Project information ----------------------------------------------------- -project = u'Ironic Prometheus Exporter Release Notes' copyright = u'2019, Ironic Prometheus Exporter Developers' # Release notes are version independent. @@ -104,7 +102,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 = []