mirror of
https://github.com/welpo/tabi.git
synced 2025-10-10 23:38:53 +02:00
Follow hierarchy + update docs + screenshot + sort settings/docs
This commit is contained in:
parent
152b37ecc5
commit
a5bedcbbc6
8 changed files with 167 additions and 112 deletions
83
config.toml
83
config.toml
|
@ -372,47 +372,6 @@ service = "goatcounter"
|
|||
# Leave this field empty if you're using the service's default hosting.
|
||||
self_hosted_url = "https://tabi-stats.osc.garden"
|
||||
|
||||
[extra.webmentions]
|
||||
enable = false
|
||||
# Specify the domain registered with webmention.io.
|
||||
# domain = ""
|
||||
|
||||
# The HTML ID for the object to fill in with the webmention data.
|
||||
# Defaults to "webmentions"
|
||||
# id = "webmentions"
|
||||
|
||||
# data configuration for the webmention.min.js script
|
||||
# The base URL to use for this page. Defaults to window.location
|
||||
# page_url =
|
||||
|
||||
# Additional URLs to check, separated by |s
|
||||
# add_urls
|
||||
|
||||
# The maximum number of words to render in reply mentions.
|
||||
# wordcount = 20
|
||||
|
||||
# The maximum number of mentions to retrieve. Defaults to 30.
|
||||
# max_webmentions = 30
|
||||
|
||||
# By default, Webmentions render using the mf2 'url' element, which plays
|
||||
# nicely with webmention bridges (such as brid.gy and telegraph)
|
||||
# but allows certain spoofing attacks. If you would like to prevent
|
||||
# spoofing, set this to a non-empty string (e.g. "true").
|
||||
# prevent_spoofing
|
||||
|
||||
# What to order the responses by; defaults to 'published'. See
|
||||
# https://github.com/aaronpk/webmention.io#api
|
||||
# sort_by
|
||||
|
||||
# The order to sort the responses by; defaults to 'up' (i.e. oldest
|
||||
# first). See https://github.com/aaronpk/webmention.io#api
|
||||
# sort_dir
|
||||
|
||||
# If set to a non-empty string (e.g. "true"), will display comment-type responses
|
||||
# (replies/mentions/etc.) as being part of the reactions
|
||||
# (favorites/bookmarks/etc.) instead of in a separate comment list.
|
||||
# comments_are_reactions = "true"
|
||||
|
||||
# giscus support for comments. https://giscus.app
|
||||
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
|
||||
[extra.giscus]
|
||||
|
@ -469,6 +428,48 @@ voting = true
|
|||
page_author_hashes = "" # hash (or list of hashes) of the author.
|
||||
lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API).
|
||||
|
||||
[extra.webmentions]
|
||||
# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section.
|
||||
enable = false
|
||||
# Specify the domain registered with webmention.io.
|
||||
domain = ""
|
||||
|
||||
# The HTML ID for the object to fill in with the webmention data.
|
||||
# Defaults to "webmentions"
|
||||
# id = "webmentions"
|
||||
|
||||
# data configuration for the webmention.min.js script
|
||||
# The base URL to use for this page. Defaults to window.location
|
||||
# page_url =
|
||||
|
||||
# Additional URLs to check, separated by |s
|
||||
# add_urls
|
||||
|
||||
# The maximum number of words to render in reply mentions.
|
||||
# wordcount = 20
|
||||
|
||||
# The maximum number of mentions to retrieve. Defaults to 30.
|
||||
# max_webmentions = 30
|
||||
|
||||
# By default, Webmentions render using the mf2 'url' element, which plays
|
||||
# nicely with webmention bridges (such as brid.gy and telegraph)
|
||||
# but allows certain spoofing attacks. If you would like to prevent
|
||||
# spoofing, set this to a non-empty string (e.g. "true").
|
||||
# prevent_spoofing
|
||||
|
||||
# What to order the responses by; defaults to 'published'. See
|
||||
# https://github.com/aaronpk/webmention.io#api
|
||||
# sort_by
|
||||
|
||||
# The order to sort the responses by; defaults to 'up' (i.e. oldest
|
||||
# first). See https://github.com/aaronpk/webmention.io#api
|
||||
# sort_dir
|
||||
|
||||
# If set to a non-empty string (e.g. "true"), will display comment-type responses
|
||||
# (replies/mentions/etc.) as being part of the reactions
|
||||
# (favorites/bookmarks/etc.) instead of in a separate comment list.
|
||||
# comments_are_reactions = "true"
|
||||
|
||||
# h-card configuration
|
||||
# Will identify you on the indieweb (see https://microformats.org/wiki/h-card)
|
||||
[extra.hcard]
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 38 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 38 KiB |
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Domina la configuració de tabi: guia completa"
|
||||
date = 2023-09-18
|
||||
updated = 2025-04-05
|
||||
updated = 2025-06-08
|
||||
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -1009,6 +1009,31 @@ Per a més informació, consulta la [pàgina de documentació de CSP](@/blog/sec
|
|||
|
||||
## Indieweb
|
||||
|
||||
### Webmentions
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix jerarquia | Requereix JavaScript |
|
||||
|:------:|:------:|:-------------:|:-----------------:|:--------------------:|
|
||||
| ❓ | ❓ | ✅ | ❓ | ✅ |
|
||||
|
||||
Com es descriu en l'estàndard W3C recomanat, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) és una manera senzilla de notificar qualsevol URL quan la menciones al teu lloc web. Des de la perspectiva del receptor, és una manera de sol·licitar notificacions quan altres llocs web la mencionen.
|
||||
|
||||
Per a llocs web estàtics, [webmention.io](https://webmention.io/) allotja un punt final de webmention que es pot utilitzar per rebre webmentions. Aquesta funcionalitat recupera les webmentions emmagatzemades a webmention.io i les mostra per a una pàgina. Hauràs de configurar un compte per al teu lloc web a webmention.io. Quan habilitis la funcionalitat de webmention, anunciarà el teu punt final de webmention.io i mostrarà les webmentions per a qualsevol pàgina.
|
||||
|
||||
Habilita les webmentions per al teu lloc web afegint el següent al teu fitxer `config.toml`.
|
||||
|
||||
```toml
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
# Especifica el domini registrat amb webmention.io.
|
||||
domain = "www.example.com"
|
||||
```
|
||||
|
||||
❓: Per desactivar les webmentions per a una secció o pàgina específica, estableix `webmentions = false` a la secció `[extra]` del front matter d'aquesta secció o pàgina.
|
||||
|
||||
La secció de webmentions es veu així:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrant republications, m'agrada, marcadors i comentaris", full_width=true) }}
|
||||
|
||||
### h-card representativa
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Domina la configuración de tabi: guía completa"
|
||||
date = 2023-09-18
|
||||
updated = 2025-04-05
|
||||
updated = 2025-06-08
|
||||
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -1010,6 +1010,31 @@ Para obtener más información, consulta la [página de documentación de CSP](@
|
|||
|
||||
## Indieweb
|
||||
|
||||
### Webmentions
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
|
||||
| ❓ | ❓ | ✅ | ❓ | ✅ |
|
||||
|
||||
Como se describe en el estándar W3C recomendado, [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) es una manera sencilla de notificar cualquier URL cuando la mencionas en tu sitio web. Desde la perspectiva del receptor, es una forma de solicitar notificaciones cuando otros sitios web la mencionan.
|
||||
|
||||
Para sitios web estáticos, [webmention.io](https://webmention.io/) aloja un punto final de webmention que se puede utilizar para recibir webmentions. Esta función recupera las webmentions almacenadas en webmention.io y las muestra para una página. Necesitarás configurar una cuenta para tu sitio web en webmention.io. Cuando habilites la función, anunciará tu punto final de webmention.io y mostrará las webmentions para cualquier página.
|
||||
|
||||
Habilita las webmentions para tu sitio web agregando lo siguiente a tu archivo `config.toml`.
|
||||
|
||||
```toml
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
# Especifica el dominio registrado con webmention.io.
|
||||
domain = "www.example.com"
|
||||
```
|
||||
|
||||
❓: Para desactivar las webmentions para una sección o página específica, establece `webmentions = false` en la sección `[extra]` del front matter de esa sección o página.
|
||||
|
||||
La sección de webmentions se ve así:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Captura de pantalla de webmentions mostrando reposts, me gusta, marcadores y comentarios", full_width=true) }}
|
||||
|
||||
### h-card representativa
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue Jerarquía | Requiere JavaScript |
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
+++
|
||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||
date = 2023-09-18
|
||||
updated = 2025-04-04
|
||||
updated = 2025-06-08
|
||||
description = "Discover the many ways you can customise your tabi site."
|
||||
|
||||
[taxonomies]
|
||||
|
@ -789,31 +789,6 @@ 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.
|
||||
|
||||
### Webmentions {#adding-webmentions}
|
||||
|
||||
As described by the recommended W3C standard [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) is a simple way to notify any URL when you mention it on your site. From the receiver's perspective, it's a way to request notifications when other sites mention it.
|
||||
|
||||
For static sites [webmention.io](https://webmention.io/) hosts a webmention endpoint that can be used to receive webmentions. This feature fetches the webmentions stored at webmention.io and displays them for a page. You will need to have setup an account for your website at webmention.io. When you enable the webmention feature it will advertise your webmention.io endpoint and display the webmentions for any post using the webmention shortcut.
|
||||
|
||||
Enable webmentions for your site by adding the following to your `config.toml` file.
|
||||
|
||||
```toml
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
domain = "www.example.com"
|
||||
```
|
||||
|
||||
Add the shortcut on the page where you want to display the webmentions:
|
||||
|
||||
```
|
||||
{{/* webmentions() */}}
|
||||
```
|
||||
|
||||
The webmentions section will then be displayed where you added it on the page as follows:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Page footer, showing a 'Site source' link") }}
|
||||
|
||||
### Analytics
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
@ -1045,6 +1020,31 @@ See the [CSP documentation page](@/blog/security/index.md) for more information.
|
|||
|
||||
## Indieweb
|
||||
|
||||
### Webmentions
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ❓ | ❓ | ✅ | ❓ | ✅ |
|
||||
|
||||
As described by the recommended W3C standard [Webmention](https://www.w3.org/TR/webmention/#abstract-p-1) is a simple way to notify any URL when you mention it on your site. From the receiver's perspective, it's a way to request notifications when other sites mention it.
|
||||
|
||||
For static sites [webmention.io](https://webmention.io/) hosts a webmention endpoint that can be used to receive webmentions. This feature fetches the webmentions stored at webmention.io and displays them for a page. You will need to have setup an account for your website at webmention.io. When you enable the webmention feature it will advertise your webmention.io endpoint and display the webmentions for all posts.
|
||||
|
||||
Enable webmentions for your site by adding the following to your `config.toml` file.
|
||||
|
||||
```toml
|
||||
[extra.webmentions]
|
||||
enable = true
|
||||
# Specify the domain registered with webmention.io.
|
||||
domain = "www.example.com"
|
||||
```
|
||||
|
||||
❓: To disable webmentions for a specific section or page, set `webmentions = false` in the `[extra]` section of that section or page's front matter.
|
||||
|
||||
The webmentions section looks like this:
|
||||
|
||||
{{ dual_theme_image(light_src="blog/mastering-tabi-settings/img/webmention_light.webp", dark_src="blog/mastering-tabi-settings/img/webmention_dark.webp" alt="Webmentions screenshot showing reposts, likes, bookmarks, and comments", full_width=true) }}
|
||||
|
||||
### Representative h-card
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
|
|
@ -340,8 +340,11 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
|||
{% include "partials/comments.html" %}
|
||||
{% endif %}
|
||||
|
||||
{# Webmentions #}
|
||||
{%- if config.extra.webmentions.enable -%}
|
||||
{#- Webmentions -#}
|
||||
{%- set global_webmentions_enabled = config.extra.webmentions.enable | default(value=false) -%}
|
||||
{%- set page_webmentions_enabled = page.extra.webmentions | default(value=global_webmentions_enabled) -%}
|
||||
{%- set webmentions_enabled = global_webmentions_enabled and page_webmentions_enabled != false or page_webmentions_enabled == true -%}
|
||||
{%- if webmentions_enabled -%}
|
||||
{%- include "partials/webmentions.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
|
|
83
theme.toml
83
theme.toml
|
@ -320,47 +320,6 @@ custom_subset = true
|
|||
# Leave this field empty if you're using the service's default hosting.
|
||||
# self_hosted_url = ""
|
||||
|
||||
[extra.webmentions]
|
||||
# enabled = false
|
||||
# Specify the domain registered with webmention.io.
|
||||
# domain = ""
|
||||
|
||||
# The HTML ID for the object to fill in with the webmention data.
|
||||
# Defaults to "webmentions"
|
||||
# id = "webmentions"
|
||||
|
||||
# data configuration for the webmention.min.js script
|
||||
# The base URL to use for this page. Defaults to window.location
|
||||
# page_url =
|
||||
|
||||
# Additional URLs to check, separated by |s
|
||||
# add_urls
|
||||
|
||||
# The maximum number of words to render in reply mentions.
|
||||
# wordcount = 20
|
||||
|
||||
# The maximum number of mentions to retrieve. Defaults to 30.
|
||||
# max_webmentions
|
||||
|
||||
# By default, Webmentions render using the mf2 'url' element, which plays
|
||||
# nicely with webmention bridges (such as brid.gy and telegraph)
|
||||
# but allows certain spoofing attacks. If you would like to prevent
|
||||
# spoofing, set this to a non-empty string (e.g. "true").
|
||||
# prevent_spoofing
|
||||
|
||||
# What to order the responses by; defaults to 'published'. See
|
||||
# https://github.com/aaronpk/webmention.io#api
|
||||
# sort_by
|
||||
|
||||
# The order to sort the responses by; defaults to 'up' (i.e. oldest
|
||||
# first). See https://github.com/aaronpk/webmention.io#api
|
||||
# sort_dir
|
||||
|
||||
# If set to a non-empty string (e.g. "true"), will display comment-type responses
|
||||
# (replies/mentions/etc.) as being part of the reactions
|
||||
# (favorites/bookmarks/etc.) instead of in a separate comment list.
|
||||
# comments_are_reactions = "true"
|
||||
|
||||
# giscus support for comments. https://giscus.app
|
||||
# Setup instructions: https://welpo.github.io/tabi/blog/comments/#setup
|
||||
[extra.giscus]
|
||||
|
@ -417,6 +376,48 @@ custom_subset = true
|
|||
# page_author_hashes = "" # hash (or list of hashes) of the author.
|
||||
# lazy_loading = true # Loads when the comments are in the viewport (using the Intersection Observer API).
|
||||
|
||||
[extra.webmentions]
|
||||
# To disable for a specific section or page, set webmentions = false in that page/section's front matter's [extra] section.
|
||||
enable = false
|
||||
# Specify the domain registered with webmention.io.
|
||||
# domain = ""
|
||||
|
||||
# The HTML ID for the object to fill in with the webmention data.
|
||||
# Defaults to "webmentions"
|
||||
# id = "webmentions"
|
||||
|
||||
# data configuration for the webmention.min.js script
|
||||
# The base URL to use for this page. Defaults to window.location
|
||||
# page_url =
|
||||
|
||||
# Additional URLs to check, separated by |s
|
||||
# add_urls
|
||||
|
||||
# The maximum number of words to render in reply mentions.
|
||||
# wordcount = 20
|
||||
|
||||
# The maximum number of mentions to retrieve. Defaults to 30.
|
||||
# max_webmentions = 30
|
||||
|
||||
# By default, Webmentions render using the mf2 'url' element, which plays
|
||||
# nicely with webmention bridges (such as brid.gy and telegraph)
|
||||
# but allows certain spoofing attacks. If you would like to prevent
|
||||
# spoofing, set this to a non-empty string (e.g. "true").
|
||||
# prevent_spoofing
|
||||
|
||||
# What to order the responses by; defaults to 'published'. See
|
||||
# https://github.com/aaronpk/webmention.io#api
|
||||
# sort_by
|
||||
|
||||
# The order to sort the responses by; defaults to 'up' (i.e. oldest
|
||||
# first). See https://github.com/aaronpk/webmention.io#api
|
||||
# sort_dir
|
||||
|
||||
# If set to a non-empty string (e.g. "true"), will display comment-type responses
|
||||
# (replies/mentions/etc.) as being part of the reactions
|
||||
# (favorites/bookmarks/etc.) instead of in a separate comment list.
|
||||
# comments_are_reactions = "true"
|
||||
|
||||
# h-card configuration
|
||||
# Will identify you on the indieweb (see https://microformats.org/wiki/h-card)
|
||||
[extra.hcard]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue