diff options
Diffstat (limited to 'Doc/conf.py')
-rw-r--r-- | Doc/conf.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Doc/conf.py b/Doc/conf.py index 161c2986441..8b2a8f20fcc 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -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">', + ] |