From 5c9c0a5dcc0ace1c761d00825574ee17eb263c31 Mon Sep 17 00:00:00 2001 From: welpo Date: Sat, 30 Dec 2023 16:27:09 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(tags):=20add=20`compact=5Ftags?= =?UTF-8?q?`=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #230. --- config.toml | 5 +++ .../blog/mastering-tabi-settings/index.ca.md | 16 ++++++++- .../blog/mastering-tabi-settings/index.es.md | 16 ++++++++- content/blog/mastering-tabi-settings/index.md | 16 ++++++++- templates/tags/list.html | 33 ++++++++++++++----- theme.toml | 5 +++ 6 files changed, 79 insertions(+), 12 deletions(-) diff --git a/config.toml b/config.toml index b7fa5f065..37f488123 100644 --- a/config.toml +++ b/config.toml @@ -129,6 +129,11 @@ short_date_format = "" # Custom separator used in title tag and posts metadata (between date, time to read, and tags). separator = "•" +# Use a shorter layout for All tags listing. +# Default: tag_name – n post[s] +# Compact: tag_name^n (superscript number) +compact_tags = false + # Invert the order of the site title and page title in the browser tab. # Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" invert_title_order = false diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index 252ae39e2..9a1b294d6 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 = 2023-12-04 +updated = 2023-12-30 description = "Descobreix les múltiples maneres en què pots personalitzar tabi." [taxonomies] @@ -142,6 +142,20 @@ Pots establir-ho a `config.toml` com a `browser_theme_colour = "#087e96"`. Si vo Aquesta variable accepta qualsevol color CSS vàlid, així que pots utilitzar paraules clau (per exemple, `blue`), codis hexadecimals (per exemple, `#087e96`) o valors RGB/HSL (per exemple, `rgb(8, 126, 150)`). +### Etiquetes compactes + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Per defecte, la [pàgina d'etiquetes](/tags) mostra les etiquetes com: + +[NomEtiqueta](#) — n entrada[es] + +Establir `compact_tags = true` les mostrarà com: + +[NomEtiqueta](#) n + --- ## Integració amb repositoris Git diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index eca753602..18b1c7d6f 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 = 2023-12-04 +updated = 2023-12-30 description = "Descubre las múltiples maneras en que puedes personalizar tabi." [taxonomies] @@ -140,6 +140,20 @@ Puedes establecerlo en `config.toml` como `browser_theme_colour = "#087e96"`. Si Esta variable acepta cualquier color CSS válido, así que puedes usar palabras clave (por ejemplo, `blue`), códigos hexadecimales (por ejemplo, `#087e96`) o valores RGB/HSL (por ejemplo, `rgb(8, 126, 150)`). +### Etiquetas compactas + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:---------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +Por defecto, la [página de etiquetas](/es/tags) muestra las etiquetas así: + +[NombreEtiqueta](#) — n publicación[es] + +Establecer `compact_tags = true` mostrará las mismas de este modo: + +[NombreEtiqueta](#) n + --- ## Integración con repositorios Git diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index 328e5aecd..99cf82334 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 = 2023-12-04 +updated = 2023-12-30 description = "Discover the many ways you can customise your tabi site." [taxonomies] @@ -142,6 +142,20 @@ You can set it in `config.toml` like `browser_theme_colour = "#087e96"`. If you' This variable accepts any valid CSS colour, so you can use keywords (e.g. `blue`), hex codes (e.g. `#087e96`) or RGB/HSL values (e.g. `rgb(8, 126, 150)`). +### Compact Tags + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ❌ | ❌ | ✅ | ❌ | ❌ | + +By default, the [tags page](/tags) displays tags as: + +[TagName](#) — n post[s] + +Setting `compact_tags = true` will display them as: + +[TagName](#) n + --- ## Git Repository Integration diff --git a/templates/tags/list.html b/templates/tags/list.html index aea411340..02433537e 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -9,15 +9,30 @@
diff --git a/theme.toml b/theme.toml index c76f8b49d..d6762a7f8 100644 --- a/theme.toml +++ b/theme.toml @@ -108,6 +108,11 @@ short_date_format = "" # Custom separator used in title tag and posts metadata (between date, time to read, and tags). separator = "•" +# Use a shorter layout for All tags listing. +# Default: tag_name – n post[s] +# Compact: tag_name^n (superscript number) +compact_tags = false + # Invert the order of the site title and page title in the browser tab. # Example: true => "Blog • ~/tabi", false => "~/tabi • Blog" invert_title_order = false