Skip to content

Commit 716eece

Browse files
committed
gh-136155: Docs: don't add custom OpenGraph protocol meta tags for EPUB builds
1 parent 0e19db6 commit 716eece

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Doc/conf.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -635,13 +635,14 @@
635635
'image': '_static/og-image.png',
636636
'line_color': '#3776ab',
637637
}
638-
ogp_custom_meta_tags = [
639-
'<meta name="theme-color" content="#3776ab">',
640-
]
641-
if 'create-social-cards' not in tags: # noqa: F821
642-
# Define a static preview image when not creating social cards
643-
ogp_image = '_static/og-image.png'
644-
ogp_custom_meta_tags += [
645-
'<meta property="og:image:width" content="200">',
646-
'<meta property="og:image:height" content="200">',
638+
if 'epub' not in tags: # noqa: F821
639+
ogp_custom_meta_tags = [
640+
'<meta name="theme-color" content="#3776ab">',
647641
]
642+
if 'create-social-cards' not in tags: # noqa: F821
643+
# Define a static preview image when not creating social cards
644+
ogp_image = '_static/og-image.png'
645+
ogp_custom_meta_tags += [
646+
'<meta property="og:image:width" content="200">',
647+
'<meta property="og:image:height" content="200">',
648+
]

0 commit comments

Comments
 (0)