mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) (#136383)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
dcfc3d3cc2
commit
f17be28cd8
2 changed files with 11 additions and 9 deletions
19
Doc/conf.py
19
Doc/conf.py
|
@ -627,13 +627,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.
|
Loading…
Add table
Add a link
Reference in a new issue