feat: add fediverse creator metadata support (#409)

Add `fediverse_creator` variable to highlight author's fediverse profile in Mastodon link previews.

Co-authored-by: Ariel Richtman <Ariel.Richtman@SilverRailTech.com>
Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
Ariel Richtman 2024-10-10 19:53:39 +07:00 committed by GitHub
parent 3fddb1f9a1
commit 886aa59545
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 53 additions and 0 deletions

View file

@ -475,6 +475,20 @@ Since it follows the [hierarchy](#settings-hierarchy), if it's not set on a page
**Protip**: automate their creation with a [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [From Bashful to Social Butterfly: Automating Link Previews for Zola Sites](https://osc.garden/blog/automating-social-media-cards-zola/).
### Fediverse Creator
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ❌ |
You can highlight your fediverse profile in Mastodon link previews by setting the `fediverse_creator` variable in your `config.toml`. For example, for @username@example.com, use:
```toml
fediverse_creator = { handle = "username", domain = "example.com" }
```
This adds metadata to your HTML, allowing Mastodon to display the author's fediverse profile when your content is shared.
---
## Navigation