From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 8 Jul 2025 07:03:40 +0000 (+0200) Subject: [3.14] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds... X-Git-Tag: v3.14.0b4~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3296d9bcfd51d4df58d437264182ee421b8cd2ca;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) (#136382) Co-authored-by: Maciej Olko Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> --- diff --git a/Doc/conf.py b/Doc/conf.py index 161c2986441e..8b2a8f20fcc5 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -635,13 +635,14 @@ ogp_social_cards = { # Used when matplotlib is installed '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 += [ - '', - '', +if 'builder_html' in tags: # noqa: F821 + 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 += [ + '', + '', + ] diff --git a/Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst b/Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst new file mode 100644 index 000000000000..0341b5f7f0d5 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst @@ -0,0 +1 @@ +EPUB builds are fixed by excluding non-XHTML-compatible tags.