File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ dist-html:
204
204
find dist -name ' python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
205
205
$(MAKE ) html
206
206
cp -pPR build/html dist/python-$(DISTVERSION ) -docs-html
207
+ rm -rf dist/python-$(DISTVERSION ) -docs-html/_images/social_previews/
207
208
tar -C dist -cf dist/python-$(DISTVERSION ) -docs-html.tar python-$(DISTVERSION ) -docs-html
208
209
bzip2 -9 -k dist/python-$(DISTVERSION ) -docs-html.tar
209
210
(cd dist; zip -q -r -9 python-$( DISTVERSION) -docs-html.zip python-$( DISTVERSION) -docs-html)
Original file line number Diff line number Diff line change 624
624
# Options for sphinxext-opengraph
625
625
# -------------------------------
626
626
627
- ogp_site_url = 'https://docs.python.org/3/'
627
+ ogp_canonical_url = 'https://docs.python.org/3/'
628
628
ogp_site_name = 'Python documentation'
629
- ogp_image = '_static/og-image.png'
629
+ ogp_social_cards = { # Used when matplotlib is installed
630
+ 'image' : '_static/og-image.png' ,
631
+ 'line_color' : '#3776ab' ,
632
+ }
630
633
ogp_custom_meta_tags = [
631
- '<meta property="og:image:width" content="200" />' ,
632
- '<meta property="og:image:height" content="200" />' ,
633
634
'<meta name="theme-color" content="#3776ab" />' ,
634
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
+ ]
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ sphinx~=8.2.0
11
11
12
12
blurb
13
13
14
- sphinxext-opengraph ~= 0.9 .0
14
+ sphinxext-opengraph ~= 0.10 .0
15
15
sphinx-notfound-page ~= 1.0.0
16
16
17
17
# The theme used by the documentation is stored separately, so we need
You can’t perform that action at this time.
0 commit comments