|
621 | 621 | # Options for sphinxext-opengraph |
622 | 622 | # ------------------------------- |
623 | 623 |
|
624 | | -ogp_site_url = 'https://hugovk-cpython.readthedocs.io/en/ogp_social_cards/' |
| 624 | +ogp_site_url = 'https://docs.python.org/3/' |
625 | 625 | ogp_site_name = 'Python documentation' |
626 | | -# ogp_image = '_static/og-image.png' |
627 | | -# ogp_custom_meta_tags = [ |
628 | | -# '<meta property="og:image:width" content="200" />', |
629 | | -# '<meta property="og:image:height" content="200" />', |
630 | | -# '<meta name="theme-color" content="#3776ab" />', |
631 | | -# ] |
632 | | - |
633 | | -ogp_social_cards = { |
634 | | - "image": "_static/og-image.png", |
635 | | - "line_color": "#3776ab", |
| 626 | +ogp_social_cards = { # Used when matplotlib is installed |
| 627 | + 'image': '_static/og-image.png', |
| 628 | + 'line_color': '#3776ab', |
636 | 629 | } |
| 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" />', |
| 639 | + ] |
0 commit comments