From 20bf587d68f6c1794168f2ad467c9c55daf074e5 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 23 Feb 2023 19:11:57 +0000 Subject: [PATCH] Only hide top-level duplicated title In change I48b923a67010c92945c46ab00de0b090ba7cd465, way back in 2016, we started hiding duplicate titles caused by us including the first h1 title we found at the top of the page. Unfortunately, the fix for this was to hide *all* h1 titles found in the main docs body. Sphinx doesn't insist on only a single h1 title (in fact, the sphinx-quickstart tool produces an index.rst with two h1 titles) which means we were hiding a lot of information unwittingly. Fix this by only hiding the first title, as originally intended. Also replace deprecated whitelist_externals by allowlist_externals in tox.ini. Change-Id: Ic8fc5e1256b4ab8925401fe6781210729a68d2aa Signed-off-by: Stephen Finucane --- .../theme/openstackdocs/static/css/combined.css | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openstackdocstheme/theme/openstackdocs/static/css/combined.css b/openstackdocstheme/theme/openstackdocs/static/css/combined.css index 2df29853..80645aaa 100644 --- a/openstackdocstheme/theme/openstackdocs/static/css/combined.css +++ b/openstackdocstheme/theme/openstackdocs/static/css/combined.css @@ -927,9 +927,9 @@ table.highlighttable { width: 100%; } /* TODO(stephenfin): Group this */ -.docs-body .section h1 { +.docs-body .section:first-of-type h1 { display: none; } -.docs-body section h1 { +.docs-body section:first-of-type h1 { display: none; } img.align-left, diff --git a/tox.ini b/tox.ini index f79bf75e..70178e06 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt sitepackages = False -whitelist_externals = +allowlist_externals = rm make