Skip to content

Commit f17be28

Browse files
miss-islingtonm-aciekblurb-it[bot]
authored
[3.13] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) (#136383)
Co-authored-by: Maciej Olko <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent dcfc3d3 commit f17be28

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Doc/conf.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,14 @@
627627
'image': '_static/og-image.png',
628628
'line_color': '#3776ab',
629629
}
630-
ogp_custom_meta_tags = [
631-
'<meta name="theme-color" content="#3776ab">',
632-
]
633-
if 'create-social-cards' not in tags: # noqa: F821
634-
# Define a static preview image when not creating social cards
635-
ogp_image = '_static/og-image.png'
636-
ogp_custom_meta_tags += [
637-
'<meta property="og:image:width" content="200">',
638-
'<meta property="og:image:height" content="200">',
630+
if 'builder_html' in tags: # noqa: F821
631+
ogp_custom_meta_tags = [
632+
'<meta name="theme-color" content="#3776ab">',
639633
]
634+
if 'create-social-cards' not in tags: # noqa: F821
635+
# Define a static preview image when not creating social cards
636+
ogp_image = '_static/og-image.png'
637+
ogp_custom_meta_tags += [
638+
'<meta property="og:image:width" content="200">',
639+
'<meta property="og:image:height" content="200">',
640+
]
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)