Skip to content

Commit 3f99ead

Browse files
committed
Define a social_cards optional extra
1 parent 4be7f53 commit 3f99ead

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Sphinx extension to generate [Open Graph metadata](https://ogp.me/) for each pag
1111
python -m pip install sphinxext-opengraph
1212
```
1313

14+
The `matplotlib` package is required to generate social cards:
15+
16+
```sh
17+
python -m pip install sphinxext-opengraph[social_cards]
18+
```
19+
1420
## Usage
1521
Just add `sphinxext.opengraph` to your extensions list in your `conf.py`
1622

@@ -19,6 +25,8 @@ extensions = [
1925
"sphinxext.opengraph",
2026
]
2127
```
28+
29+
2230
## Options
2331
These values are placed in the `conf.py` of your Sphinx project.
2432

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ dependencies = [
4343
]
4444
dynamic = ["version"]
4545

46+
[project.optional-dependencies]
47+
social_cards = [
48+
"matplotlib>=3",
49+
]
50+
4651
[[project.authors]]
4752
name = "Itay Ziv"
4853

0 commit comments

Comments
 (0)