Added support for font variants in social plugin

This commit is contained in:
squidfunk 2024-03-20 15:41:55 +08:00
parent 3f09228249
commit 8addc95d9d
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF

View File

@ -420,6 +420,7 @@ defining which parts of your layout can be parametrized. The [`default` layouts]
- [`background_image`][option.background_image] - [`background_image`][option.background_image]
- [`color`][option.color] - [`color`][option.color]
- [`font_family`][option.font_family] - [`font_family`][option.font_family]
- [`font_variant`][option.font_variant]
- [`logo`][option.logo] - [`logo`][option.logo]
- [`title`][option.title] - [`title`][option.title]
- [`description`][option.description] - [`description`][option.description]
@ -979,6 +980,29 @@ no further configuration needed.
--- ---
#### <!-- md:setting option.font_variant -->
<!-- md:sponsors -->
<!-- md:version insiders-4.53.3 -->
<!-- md:default none -->
Use this option to change the font variant used to generate the social card.
If the downloaded font has variants like `Condensed` or `Expanded`, you can set
them with:
``` yaml
plugins:
- social:
cards_layout_options:
font_variant: Condensed
```
The variant is combined with the style as used in the custom layout, so the
plugin is instructed to use combinations like `Condensed Regular` or
`Expanded Bold`.
---
#### <!-- md:setting option.logo --> #### <!-- md:setting option.logo -->
<!-- md:sponsors --> <!-- md:sponsors -->