Skip to content

Commit c9ab6d3

Browse files
m-aciekblurb-it[bot]
authored andcommitted
[3.12] pythongh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (pythonGH-136187)
(cherry picked from commit c45da6a) Co-authored-by: Maciej Olko <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent c555f88 commit c9ab6d3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Doc/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,9 @@
601601
ogp_site_url = 'https://docs.python.org/3/'
602602
ogp_site_name = 'Python documentation'
603603
ogp_image = '_static/og-image.png'
604-
ogp_custom_meta_tags = [
605-
'<meta property="og:image:width" content="200">',
606-
'<meta property="og:image:height" content="200">',
607-
'<meta name="theme-color" content="#3776ab">',
608-
]
604+
if 'builder_html' in tags: # noqa: F821
605+
ogp_custom_meta_tags = [
606+
'<meta property="og:image:width" content="200">',
607+
'<meta property="og:image:height" content="200">',
608+
'<meta name="theme-color" content="#3776ab">',
609+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EPUB builds are fixed by excluding non-XHTML-compatible tags.

0 commit comments

Comments
 (0)