You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use first image (after refactor)
Co-authored-by: tcmetzger <[email protected]>
* black
* fix first_image no uri edge case
* Use iana instead of wikipedia for mime types
* black
* Address comments
* black
Co-authored-by: tcmetzger <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Just add `sphinxext.opengraph` to your extensions list in your `conf.py`
13
13
14
14
```python
15
15
extensions = [
16
-
sphinxext.opengraph,
16
+
"sphinxext.opengraph",
17
17
]
18
18
```
19
19
## Options
@@ -29,6 +29,8 @@ These values are placed in the conf.py of your sphinx project.
29
29
* This is not required. Link to image to show.
30
30
*`ogp_image_alt`
31
31
* This is not required. Alt text for image. Defaults to using `ogp_site_name` or the document's title as alt text, if available. Set to `False` if you want to turn off alt text completely.
32
+
*`ogp_use_first_image`
33
+
* This is not required. Set to True to use each page's first image, if available. If set to True but no image is found, Sphinx will use `ogp_image` instead.
32
34
*`ogp_type`
33
35
* This sets the ogp type attribute, for more information on the types available please take a look at https://ogp.me/#types. By default it is set to `website`, which should be fine for most use cases.
0 commit comments