Skip to content

Commit 15d9dac

Browse files
committed
Documentation
1 parent 5afacad commit 15d9dac

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ RUN \
6161
if [ "${WITH_PLUGINS}" = "true" ]; then \
6262
pip install --no-cache-dir \
6363
"mkdocs-minify-plugin>=0.3" \
64-
"mkdocs-redirects>=1.0"; \
64+
"mkdocs-redirects>=1.0" \
65+
"pillow>=9.0" \
66+
"cairosvg>=2.5"; \
6567
fi \
6668
&& \
6769
apk del .build \

docs/setup/setting-up-social-cards.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,18 @@ The following configuration options are available:
118118

119119
#### Dependencies
120120

121-
Two Python packages are installed alongside Material for MkDocs to generate the
122-
social preview images, both of which are based on the [Cairo Graphics] library:
121+
Two Python libraries must be installed alongside Material for MkDocs to generate
122+
the social preview images, both of which are based on [Cairo Graphics] –
123+
[Pillow] and [CairoSVG]:
123124

124-
- [Pillow] – Python imaging library
125-
- [CairoSVG] – Converter for `*.svg` files
125+
```
126+
pip install pillow cairosvg
127+
```
126128

127-
The [Docker image] comes with all dependencies pre-installed. If
128-
you don't want to use Docker, see the following section which explains how to
129-
install all dependencies on your system:
129+
Both libraries are built with native extensions which need to be installed as
130+
well. The [Docker image] comes with all dependencies pre-installed. If you don't
131+
want to use Docker, see the following section which explains how to install all
132+
dependencies on your system:
130133

131134
=== ":material-apple: macOS"
132135

material/plugins/social/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def on_config(self, config):
7070
if not dependencies:
7171
log.error(
7272
"Required dependencies of \"social\" plugin not found. "
73-
"Install with: pip install cairosvg pillow"
73+
"Install with: pip install pillow cairosvg"
7474
)
7575
sys.exit()
7676

src/plugins/social/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def on_config(self, config):
7070
if not dependencies:
7171
log.error(
7272
"Required dependencies of \"social\" plugin not found. "
73-
"Install with: pip install cairosvg pillow"
73+
"Install with: pip install pillow cairosvg"
7474
)
7575
sys.exit()
7676

0 commit comments

Comments
 (0)