diff --git a/config.toml b/config.toml index d255a90..078dba9 100644 --- a/config.toml +++ b/config.toml @@ -267,6 +267,11 @@ socials = [ { name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" }, ] +# Fediverse profile. +# Adds metadata to feature the author's profile in Mastodon link previews. +# Example: for @username@example.com, use: +# fediverse_creator = { handle = "username", domain = "example.com" } + # Extra menu to show on the footer, below socials section. footer_menu = [ {url = "about", name = "about", trailing_slash = true}, diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index 42ff053..a0f3552 100644 --- a/content/blog/mastering-tabi-settings/index.ca.md +++ b/content/blog/mastering-tabi-settings/index.ca.md @@ -470,6 +470,18 @@ Ja que segueix la [jerarquia](#jerarquia-de-configuracio), si no està configura **Consell**: automatitza la seva creació amb un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservat a rei de les xarxes: automatitzant les vistes prèvies dels enllaços amb Zola](https://osc.garden/ca/blog/automating-social-media-cards-zola/). +### Creador del fedivers + +| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Pots mostrar el perfil del fedivers de l'autor en les previsualitzacions d'enllaços de Mastodon configurant la variable `fediverse_creator` al teu `config.toml`. Per exemple, per a @username@example.com, fes servir: + +```toml +fediverse_creator = { handle = "username", domain = "example.com" } +``` + --- ## Navegació diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index 217eb73..1996c4a 100644 --- a/content/blog/mastering-tabi-settings/index.es.md +++ b/content/blog/mastering-tabi-settings/index.es.md @@ -470,6 +470,18 @@ Dado que sigue la [jerarquía](#jerarquia-de-configuracion), si no está configu **Consejo**: automatiza su creación con un [script](https://github.com/welpo/osc.garden/blob/main/static/code/social-cards-zola): [De reservado a rey de las redes: automatizando las vistas previas de los enlaces con Zola](https://osc.garden/es/blog/automating-social-media-cards-zola/). +### Creador del fediverso + +| Página | Sección | `config.toml` | Sigue jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Puedes mostrar tu perfil del fediverso en las vistas previas de enlaces de Mastodon configurando la variable `fediverse_creator` en tu `config.toml`. Por ejemplo, para @username@example.com, usa: + +```toml +fediverse_creator = { handle = "username", domain = "example.com" } +``` + --- ## Navegación diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index 5f1763f..8a7023e 100644 --- a/content/blog/mastering-tabi-settings/index.md +++ b/content/blog/mastering-tabi-settings/index.md @@ -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 diff --git a/templates/partials/header.html b/templates/partials/header.html index b008643..3d3c56f 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -174,6 +174,11 @@ {%- include "partials/analytics.html" -%} {%- endif -%} + {# Socials #} + {%- if config.extra.fediverse_creator -%} + + {%- endif -%} + {# Search #} {%- if config.build_search_index -%} {%- if config.search.index_format -%} diff --git a/theme.toml b/theme.toml index 42add05..4b1b57e 100644 --- a/theme.toml +++ b/theme.toml @@ -224,6 +224,11 @@ encode_plaintext_email = true # Setting is ignored if email is already encoded. # { name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" }, # ] +# Fediverse profile. +# Adds metadata to feature the author's profile in Mastodon link previews. +# Example: for @username@example.com, use: +# fediverse_creator = { handle = "username", domain = "example.com" } + # Extra menu to show on the footer, below socials section. # footer_menu = [ # {url = "about", name = "about", trailing_slash = true},