From c9ab6d338a62ffd74e1dcfd7f345f3ef841ea2ba Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Mon, 7 Jul 2025 15:29:27 +0200 Subject: [PATCH 1/3] [3.12] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) (cherry picked from commit c45da6ae16a0bc796e880c9dbcd4f643345b03b7) Co-authored-by: Maciej Olko Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> --- Doc/conf.py | 11 ++++++----- .../2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst diff --git a/Doc/conf.py b/Doc/conf.py index 526df2dad9294a..81075f43dd33f6 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -601,8 +601,9 @@ ogp_site_url = 'https://docs.python.org/3/' ogp_site_name = 'Python documentation' ogp_image = '_static/og-image.png' -ogp_custom_meta_tags = [ - '', - '', - '', -] +if 'builder_html' in tags: # noqa: F821 + 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 00000000000000..0341b5f7f0d5e6 --- /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. From 25dcf4371817dd0e98bd8107e8ed96e852fe989a Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 3 Aug 2025 19:32:46 +0100 Subject: [PATCH 2/3] GH-136155: Use ``sphinxext-opengraph`` v0.11.0 (#137348) --- Doc/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/requirements.txt b/Doc/requirements.txt index 2e429f46b43408..924e218c9f67d9 100644 --- a/Doc/requirements.txt +++ b/Doc/requirements.txt @@ -11,7 +11,7 @@ sphinx~=8.2.0 blurb -sphinxext-opengraph~=0.9.0 +sphinxext-opengraph~=0.11.0 sphinx-notfound-page~=1.0.0 # The theme used by the documentation is stored separately, so we need From ff315b7964d793426d5e2aaf361e00449d25e89b Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 5 Aug 2025 21:14:31 +0100 Subject: [PATCH 3/3] GH-136155: Use ``sphinxext-opengraph`` v0.12.0 (#137393) --- Doc/conf.py | 11 +++++------ Doc/requirements.txt | 2 +- .../2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst diff --git a/Doc/conf.py b/Doc/conf.py index 81075f43dd33f6..61c4e7d2b57fc8 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -601,9 +601,8 @@ ogp_site_url = 'https://docs.python.org/3/' ogp_site_name = 'Python documentation' ogp_image = '_static/og-image.png' -if 'builder_html' in tags: # noqa: F821 - ogp_custom_meta_tags = [ - '', - '', - '', - ] +ogp_custom_meta_tags = ( + '', + '', + '', +) diff --git a/Doc/requirements.txt b/Doc/requirements.txt index 924e218c9f67d9..7b7286429a1041 100644 --- a/Doc/requirements.txt +++ b/Doc/requirements.txt @@ -11,7 +11,7 @@ sphinx~=8.2.0 blurb -sphinxext-opengraph~=0.11.0 +sphinxext-opengraph~=0.12.0 sphinx-notfound-page~=1.0.0 # The theme used by the documentation is stored separately, so we need 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 deleted file mode 100644 index 0341b5f7f0d5e6..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2025-07-01-21-04-47.gh-issue-136155.ufmH4Q.rst +++ /dev/null @@ -1 +0,0 @@ -EPUB builds are fixed by excluding non-XHTML-compatible tags.