feat(iine): add like buttons (#550)

This commit is contained in:
Óscar 2025-08-01 21:43:04 +02:00 committed by GitHub
parent 79b5dcf9a7
commit daa8b1a412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 505 additions and 8 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Domina la configuració de tabi: guia completa"
date = 2023-09-18
updated = 2025-06-16
updated = 2025-08-01
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
[taxonomies]
@ -780,6 +780,35 @@ Si has activat un sistema de forma global i vols desactivar-lo per a una pàgina
Llegeix la [documentació](@/blog/comments/index.ca.md) per a més informació sobre els sistemes disponibles i la seva configuració.
### Botons d'iine {#iine}
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:--------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi permet botons d'[iine](https://iine.to/) per mostrar apreciació anònima pel teu contingut. Aquests botons centrats en la privadesa funcionen sense JavaScript i no rastegen usuaris.
Per activar els botons iine globalment:
```toml
[extra]
iine = true
```
Pots personalitzar la icona usada als botons (segueix la jerarquia):
```toml
[extra]
iine_icon = "thumbs_up" # Opcions: "heart", "thumbs_up", "upvote", o qualsevol emoji
```
Per a llocs multilingües, pots unificar els recomptes de likes entre versions en diferents idiomes del mateix contingut (configuració només de config; valor per defecte és `true`):
```toml
[extra]
iine_unified_languages = true # Els likes a /ca/blog/hello/ compten cap a /blog/hello/
```
### Anàlisi web
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |

View file

@ -1,7 +1,7 @@
+++
title = "Domina la configuración de tabi: guía completa"
date = 2023-09-18
updated = 2025-06-16
updated = 2025-08-01
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
[taxonomies]
@ -781,6 +781,37 @@ Si has activado un sistema globalmente, pero quieres desactivarlo en una página
Lee la [documentación](@/blog/comments/index.es.md) para obtener más información sobre los sistemas disponibles y su configuración.
### Botones de iine {#iine}
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:-------------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi soporta botones de [iine](https://iine.to/) para mostrar apreciación anónima por tu contenido. Estos botones centrados en la privacidad funcionan sin JavaScript y no rastrean usuarios.
Para activar los botones iine globalmente:
```toml
[extra]
iine = true
```
Puedes personalizar el icono usado en los botones (esta configuración sigue la jerarquía):
```toml
[extra]
iine_icon = "thumbs_up" # Opciones: "heart", "thumbs_up", "upvote", o cualquier emoji
```
Para sitios multilingües, puedes unificar los conteos de likes entre versiones en diferentes idiomas del mismo contenido (configuración solo de config; valor predeterminado: `true`):
```toml
[extra]
iine_unified_languages = true # Los likes en /es/blog/hello/ cuentan hacia /blog/hello/
```
También puedes activar los botones iine en páginas o secciones individuales estableciendo `iine = true` en su front matter, o personalizar el icono con `iine_icon = "🚀"`.
### Análisis web
| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript |

View file

@ -1,7 +1,7 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2025-06-16
updated = 2025-08-01
description = "Discover the many ways you can customise your tabi site."
[taxonomies]
@ -789,6 +789,37 @@ If you have enabled a system globally, but want to disable it on a specific page
Read [the docs](@/blog/comments/index.md) for more information on the available systems and their setup.
### iine Like Buttons {#iine}
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ✅ | ✅ | ✅ | ✅ | ❌ |
tabi supports [iine](https://iine.to/) like buttons for anonymous appreciation of your content. These privacy-focused buttons work without JavaScript and don't track users.
To enable iine buttons globally:
```toml
[extra]
iine = true
```
You can customise the icon used for the buttons (follows the hierarchy):
```toml
[extra]
iine_icon = "thumbs_up" # Options: "heart", "thumbs_up", "upvote", or any emoji
```
For multilingual sites, you can unify like counts across language versions of the same content (config-only setting; true by default):
```toml
[extra]
iine_unified_languages = true # Likes on /es/blog/hello/ count towards /blog/hello/
```
You can also enable iine buttons on individual pages or sections by setting `iine = true` in their front matter, or override the icon with `iine_icon = "🚀"`.
### Analytics
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |

View file

@ -1,7 +1,7 @@
+++
title = "Shortcodes personalitzats"
date = 2023-02-19
updated = 2025-02-15
updated = 2025-08-01
description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran."
[taxonomies]
@ -187,6 +187,28 @@ Tots els altres shortcodes d'imatges poden utilizar l'amplada completa assignant
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografia d'un canal a Àmsterdam") */}}
```
## Shortcodes socials
### iine
{{ aside(text="Per afegir-lo a totes les publicacions, estableix `iine = true` a la secció `[extra]` del teu `config.toml`.") }}
Aquest shortcode et permet afegir botons addicionals d'[iine.to](https://iine.to) a les teves publicacions, com aquest:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Ús
```
{{/* iine(icon="heart", slug="/post/el-meu-slug-de-post/like", label="M'agrada aquesta publicació") */}}
```
El shortcode accepta els següents paràmetres opcionals:
- `icon`: La icona a mostrar. Pot ser `heart`, `thumbs_up`, `upvote`, o qualsevol emoji.
- `slug`: Un identificador únic. Per defecte és la ruta de la pàgina actual. Útil si vols més d'un botó a la mateixa pàgina.
- `label`: L'etiqueta d'accessibilitat per al botó. Per defecte és "M'agrada aquesta publicació".
## Shortcodes de codi
### Mostrar ruta o URL

View file

@ -1,7 +1,7 @@
+++
title = "Shortcodes personalizados"
date = 2023-02-19
updated = 2025-02-15
updated = 2025-08-01
description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más."
[taxonomies]
@ -186,6 +186,28 @@ Todos los otros shortcodes de imágenes pueden usar el ancho completo asignando
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Fotografía de un canal en Ámsterdam") */}}
```
## Shortcodes sociales
### iine
{{ aside(text="Para añadirlo a todas las publicaciones, establece `iine = true` en la sección `[extra]` de tu `config.toml`.") }}
Este shortcode te permite añadir botones adicionales de [iine.to](https://iine.to) a tus publicaciones, como este:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Uso
```
{{/* iine(icon="heart", slug="/post/mi-slug-de-post/like", label="Me gusta esta publicación") */}}
```
El shortcode acepta los siguientes parámetros opcionales:
- `icon`: El icono a mostrar. Puede ser `heart`, `thumbs_up`, `upvote`, o cualquier emoji.
- `slug`: Un identificador único. Por defecto es la ruta de la página actual. Útil si quieres más de un botón en la misma página.
- `label`: La etiqueta de accesibilidad para el botón. Por defecto es "Me gusta esta publicación".
## Shortcodes de código
### Mostrar ruta o URL

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2025-05-18
updated = 2025-07-26
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
[taxonomies]
@ -188,6 +188,28 @@ All other image shortcodes can be made into full-width by setting the optional p
{{/* full_width_image(src="img/amsterdam_by_oskerwyld.webp", alt="Photograph of a canal in Amsterdam") */}}
```
## Engagement shortcodes
### iine
{{ aside(text="To add it to all posts, set `iine = true` in the `[extra]` section of your `config.toml`.") }}
This shortcode allows you to add extra [iine.to](https://iine.to) buttons to your posts, like this:
{{ iine(slug="/blog/shortcodes/demo-button") }}
#### Usage
```
{{/* iine(icon="heart", slug="/post/my-post-slug/like", label="Like this post") */}}
```
The shortcode takes the following optional parameters:
- `icon`: The icon to display. Can be `heart`, `thumbs_up`, `upvote`, or any emoji.
- `slug`: A unique identifier. Defaults to the current page's path. Useful if you want more than one button on the same page.
- `label`: The accessibility label for the button. Defaults to "Like this post".
## Code shortcodes
### Show source or path