From 5f28b0e87efe4e56f0ed3e805d122242b89e5f8b Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Sat, 10 May 2025 16:51:35 +0200 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20feat(webmentions):=20add=20hcar?= =?UTF-8?q?d=20in=20post=20page=20(#524)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: welpo --- templates/page.html | 4 ++++ templates/partials/hcard.html | 2 +- templates/partials/hcard_small.html | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 templates/partials/hcard_small.html diff --git a/templates/page.html b/templates/page.html index 8ed6816..e458d64 100644 --- a/templates/page.html +++ b/templates/page.html @@ -137,6 +137,10 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e {%- set previous_visible = true -%} {% endif %} + {% if config.extra.hcard and config.extra.hcard.enable and ( not author_list or author_list is containing(config.author)) %} + {% include "partials/hcard_small.html" %} + {% endif %} + {%- set separator_with_class = ""-%} {#- Date -#} diff --git a/templates/partials/hcard.html b/templates/partials/hcard.html index 91c023b..6479da6 100644 --- a/templates/partials/hcard.html +++ b/templates/partials/hcard.html @@ -16,7 +16,7 @@ {%- if hcard.avatar -%} {{ full_name }} + + From 68c35b02f8c09e21ecff48f61bad6da3d96ce337 Mon Sep 17 00:00:00 2001 From: tzinm Date: Sun, 11 May 2025 14:33:27 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=90=9B=20fix(feed):=20prioritise=20de?= =?UTF-8?q?scription=20>=20summary=20(#525)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/atom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/atom.xml b/templates/atom.xml index 8b54926..1c8e18b 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -98,10 +98,10 @@ {% if config.extra.full_content_in_feed %} {{ page.content }} {% endif -%} - {% if page.summary -%} - {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… - {% elif page.description -%} + {% if page.description -%} {{ page.description }} + {% elif page.summary -%} + {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… {% endif -%} {%- endfor %} From 5c1e4acbb1cec0064055ba66092765b92b59d6b4 Mon Sep 17 00:00:00 2001 From: b1n <120295547+b1nhack@users.noreply.github.com> Date: Fri, 30 May 2025 04:09:47 -0400 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=93=9D=20misc(README):=20add=20b1n.io?= =?UTF-8?q?=20to=20'sites=20using=20tabi'=20(#531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ceec3e2..387039e 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,7 @@ git pull | [ZzMzaw's blog](https://zzmzaw.github.io/) | ZzMzaw ([ZzMzaw](https://github.com/ZzMzaw)) | Personal blog | [Source](https://github.com/ZzMzaw/zzmzaw.github.io) | | [idle-ti.me](https://idle-ti.me/) | Jérôme Ramette ([be-next](https://github.com/be-next)) | Personal blog | [Source](https://github.com/be-next/idle-ti.me) | | [tzinm.me](https://tzinm.me/) | [Tzinm](https://github.com/tzinm) | Personal blog | [Source](https://codeberg.org/tzinm/blog) | +| [b1n.io](https://b1n.io) | [b1nhack](https://github.com/b1nhack) | Linux kernel vulnerability researcher | [Source](https://github.com/b1nhack/blog) | Using tabi? Feel free to create a PR and add your site to this list. From 979f347fb0083177672a88148932f5809fbdb813 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 1 Jun 2025 08:12:41 -0700 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9C=A8=20feat:=20extend=20tabi=20`?= =?UTF-8?q?`=20and=20``=20elements=20(#528)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: welpo --- .../blog/mastering-tabi-settings/index.ca.md | 17 ++++++++++++++++- .../blog/mastering-tabi-settings/index.es.md | 17 ++++++++++++++++- content/blog/mastering-tabi-settings/index.md | 17 ++++++++++++++++- templates/base.html | 3 +++ templates/partials/header.html | 2 ++ 5 files changed, 53 insertions(+), 3 deletions(-) diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index 4ce5225..191453f 100644 --- a/content/blog/mastering-tabi-settings/index.ca.md +++ b/content/blog/mastering-tabi-settings/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Domina la configuració de tabi: guia completa" date = 2023-09-18 -updated = 2025-04-05 +updated = 2025-06-01 description = "Descobreix les múltiples maneres en què pots personalitzar tabi." [taxonomies] @@ -1027,6 +1027,21 @@ Totes les altres [propietats h-card](https://microformats.org/wiki/h-card#Proper --- +## Estenent elements HTML a tabi + +Alguns elements HTML a tabi es poden estendre per admetre casos d'ús addicionals, com ara afegir JavaScript personalitzat per a comportaments a tot el lloc al final de l'etiqueta `` o incloure contingut addicional al final de l'element `` que no estigui suportat per altres configuracions de tabi. + +Consulta la taula a continuació per veure els elements que es poden estendre: + +| Element | Plantilla | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +No hi ha configuracions explícites que hagis d'establir per al teu lloc o pàgines. Simplement crea el fitxer de plantilla corresponent per al teu lloc, i tabi l'inclourà automàticament. + +--- + [^1]: Si estàs utilitzant un repositori Git remot, potser voldràs automatitzar el procés d'actualització del camp `updated`. Aquí tens una guia per a això: [Zola Git Hook: actualitzant les dates de les publicacions](https://osc.garden/ca/blog/zola-date-git-hook/). [^2]: Per a codificar el teu correu electrònic en base64 pots utilitzar [eines en línia](https://www.base64encode.org/) o, al teu terminal, executar: `printf 'mail@example.com' | base64` diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index 5fcefd4..cdaabed 100644 --- a/content/blog/mastering-tabi-settings/index.es.md +++ b/content/blog/mastering-tabi-settings/index.es.md @@ -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-01 description = "Descubre las múltiples maneras en que puedes personalizar tabi." [taxonomies] @@ -1028,6 +1028,21 @@ Todas las demás [propiedades de h-card](https://microformats.org/wiki/h-card#Pr --- +## Extendiendo elementos HTML en tabi + +Algunos elementos HTML en tabi pueden extenderse para admitir casos de uso adicionales, como agregar JavaScript personalizado para comportamientos en todo el sitio al final de la etiqueta `` o incluir contenido adicional al final del elemento `` que no esté soportado por otras configuraciones de tabi. + +Consulta la tabla a continuación para ver los elementos que pueden extenderse: + +| Elemento | Plantilla | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +No hay configuraciones explícitas que debas establecer para tu sitio o páginas. Simplemente crea el archivo de plantilla correspondiente para tu sitio, y tabi lo incluirá automáticamente. + +--- + [^1]: Si estás utilizando un repositorio Git remoto, es posible que quieras automatizar el proceso de actualización del campo `updated`. Aquí tienes una guía para eso: [Zola Git Hook: actualizando las fechas de las publicaciones](https://osc.garden/es/blog/zola-date-git-hook/). [^2]: Para codificar tu correo electrónico en base64 puedes utilizar [herramientas en línea](https://www.base64encode.org/) o, en tu terminal, ejecutar: `printf 'mail@example.com' | base64` diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index c212e5e..9415d9d 100644 --- a/content/blog/mastering-tabi-settings/index.md +++ b/content/blog/mastering-tabi-settings/index.md @@ -1,7 +1,7 @@ +++ title = "Mastering tabi Settings: A Comprehensive Guide" date = 2023-09-18 -updated = 2025-04-04 +updated = 2025-06-01 description = "Discover the many ways you can customise your tabi site." [taxonomies] @@ -1038,6 +1038,21 @@ All other [h-card properties](https://microformats.org/wiki/h-card#Properties) c --- +## Extending HTML Elements in tabi + +Some HTML elements in tabi can be extended to support additional use cases such as adding custom JavaScript for site-wide behavior at the end of the `` tag or including additional content at the end of the `` element that is not otherwise supported by other tabi settings. + +See the table below for elements that can be extended: + +| Element | Template | +| :------: | :-------------------------------: | +| `` | `templates/tabi/extend_head.html` | +| `` | `templates/tabi/extend_body.html` | + +There are no explicit settings to configure for your site or pages. Simply create the relevant template file for your site, and tabi will automatically include it. + +--- + [^1]: If you're using a remote Git repository, you might want to automate the process of updating the `updated` field. Here's a guide for that: [Zola Git Pre-Commit Hook: Updating Post Dates](https://osc.garden/blog/zola-date-git-hook/). [^2]: To encode your email in base64 you can use [online tools](https://www.base64encode.org/) or, on your terminal, run: `printf 'mail@example.com' | base64`. diff --git a/templates/base.html b/templates/base.html index 20eafa7..56f2a65 100644 --- a/templates/base.html +++ b/templates/base.html @@ -43,6 +43,9 @@ This variable will hold all the text strings for the language #} {% endblock main_content %} {% include "partials/footer.html" %} + + {# Users can optionally provide this template to add content to the body element. #} + {% include "tabi/extend_body.html" ignore missing %} diff --git a/templates/partials/header.html b/templates/partials/header.html index 049450e..ada1f23 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -177,4 +177,6 @@ {%- endif -%} {%- endif -%} + {# Users can optionally provide this template to add content to the head element. #} + {% include "tabi/extend_head.html" ignore missing %} From 84c67ab2b2f07fb45318fe851ef713bb4dbc3586 Mon Sep 17 00:00:00 2001 From: bajacc <32907600+bajacc@users.noreply.github.com> Date: Sun, 1 Jun 2025 19:56:50 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=90=9B=20fix:=20allow=20feed=20icon?= =?UTF-8?q?=20to=20be=20hidden=20(#533)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros/feed_utils.html | 2 +- templates/partials/footer.html | 2 +- templates/tags/single.html | 2 +- templates/taxonomy_single.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/macros/feed_utils.html b/templates/macros/feed_utils.html index 653fcda..ff35194 100644 --- a/templates/macros/feed_utils.html +++ b/templates/macros/feed_utils.html @@ -11,7 +11,7 @@ {#- Check footer feed icon conditions -#} {%- macro should_show_footer_feed_icon() -%} - {%- set generate_feed = feed_utils::get_generate_feed() -%} + {%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} {%- set feed_url = feed_utils::get_feed_url() -%} {{- generate_feed and config.extra.feed_icon and feed_url -}} {%- endmacro should_show_footer_feed_icon -%} diff --git a/templates/partials/footer.html b/templates/partials/footer.html index bbab691..db4bd85 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -6,7 +6,7 @@ {#- Feed icon -#} {%- set feed_url = feed_utils::get_feed_url() -%} -{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() -%} +{%- set should_show_feed = feed_utils::should_show_footer_feed_icon() == "true" -%} {%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%} diff --git a/templates/tags/single.html b/templates/tags/single.html index 117744f..2f25fd2 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -3,7 +3,7 @@ {% block main_content %} {#- Feed icon -#} -{%- set generate_feed = feed_utils::get_generate_feed() -%} +{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} {%- set feed_url = feed_utils::get_feed_url() -%} {%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%} {%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") -%} diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index ee3aa88..ff09a3b 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -3,7 +3,7 @@ {% block main_content %} {#- Feed icon -#} -{%- set generate_feed = feed_utils::get_generate_feed() -%} +{%- set generate_feed = feed_utils::get_generate_feed() == "true" -%} {%- set feed_url = feed_utils::get_feed_url() -%} {%- set feed_pre_conditions = generate_feed and feed_url and taxonomy.feed -%} {%- set show_feed_icon = feed_pre_conditions and term.pages | filter(attribute="date") | length > 0 -%}