From 1a9a4098f1a88494b1668763a4399e7bd1359153 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 16 May 2025 00:44:17 +0200 Subject: [PATCH 1/2] Move meta theme-color to layout.html --- Doc/conf.py | 5 +---- Doc/tools/templates/layout.html | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index 467961dd5e2bff..05b55cfd3ffae0 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -630,13 +630,10 @@ 'image': '_static/og-image.png', 'line_color': '#3776ab', } -ogp_custom_meta_tags = [ - '', -] if 'create-social-cards' not in tags: # noqa: F821 # Define a static preview image when not creating social cards ogp_image = '_static/og-image.png' - ogp_custom_meta_tags += [ + ogp_custom_meta_tags = [ '', '', ] diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html index 1cb0200822d9fe..544db562097f29 100644 --- a/Doc/tools/templates/layout.html +++ b/Doc/tools/templates/layout.html @@ -31,6 +31,7 @@ {% endif %} + {% if pagename == 'whatsnew/changelog' and not embedded %} {% endif %} {% endif %} From f9ea933dcd37b6dcb9d921573ec7860596422bb2 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 16 May 2025 00:45:29 +0200 Subject: [PATCH 2/2] Make custom OGP meta tags self-closing For EPUB builds validity. --- Doc/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index 05b55cfd3ffae0..a60006d61a3112 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -634,6 +634,7 @@ # Define a static preview image when not creating social cards ogp_image = '_static/og-image.png' ogp_custom_meta_tags = [ - '', - '', + # Self-closing for EPUB validity + '', + '', ]