|
624 | 624 | # Options for sphinxext-opengraph |
625 | 625 | # ------------------------------- |
626 | 626 |
|
627 | | -ogp_site_url = 'https://hugovk-cpython.readthedocs.io/en/ogp_social_cards/' |
| 627 | +ogp_site_url = 'https://docs.python.org/3/' |
628 | 628 | ogp_site_name = 'Python documentation' |
629 | | -# ogp_image = '_static/og-image.png' |
630 | | -# ogp_custom_meta_tags = [ |
631 | | -# '<meta property="og:image:width" content="200" />', |
632 | | -# '<meta property="og:image:height" content="200" />', |
633 | | -# '<meta name="theme-color" content="#3776ab" />', |
634 | | -# ] |
635 | | - |
636 | | -ogp_social_cards = { |
637 | | - "image": "_static/og-image.png", |
638 | | - "line_color": "#3776ab", |
| 629 | +ogp_social_cards = { # Used when matplotlib is installed |
| 630 | + 'image': '_static/og-image.png', |
| 631 | + 'line_color': '#3776ab', |
639 | 632 | } |
| 633 | +ogp_custom_meta_tags = [ |
| 634 | + '<meta name="theme-color" content="#3776ab" />', |
| 635 | +] |
| 636 | +if 'create-social-cards' not in tags: # noqa: F821 |
| 637 | + # Define a static preview image when not creating social cards |
| 638 | + ogp_image = '_static/og-image.png' |
| 639 | + ogp_custom_meta_tags += [ |
| 640 | + '<meta property="og:image:width" content="200" />', |
| 641 | + '<meta property="og:image:height" content="200" />', |
| 642 | + ] |
0 commit comments