mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (#136187)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
+10
-9
@@ -635,13 +635,14 @@ ogp_social_cards = { # Used when matplotlib is installed
|
||||
'image': '_static/og-image.png',
|
||||
'line_color': '#3776ab',
|
||||
}
|
||||
ogp_custom_meta_tags = [
|
||||
'<meta name="theme-color" content="#3776ab">',
|
||||
]
|
||||
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 += [
|
||||
'<meta property="og:image:width" content="200">',
|
||||
'<meta property="og:image:height" content="200">',
|
||||
if 'builder_html' in tags: # noqa: F821
|
||||
ogp_custom_meta_tags = [
|
||||
'<meta name="theme-color" content="#3776ab">',
|
||||
]
|
||||
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 += [
|
||||
'<meta property="og:image:width" content="200">',
|
||||
'<meta property="og:image:height" content="200">',
|
||||
]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
EPUB builds are fixed by excluding non-XHTML-compatible tags.
|
||||
Reference in New Issue
Block a user