From fbad744c035117c916200a181662c893760f4d0c Mon Sep 17 00:00:00 2001 From: Jiogo18 <30299784+Jiogo18@users.noreply.github.com> Date: Sun, 16 Feb 2025 14:34:34 -0500 Subject: [PATCH 1/2] fix: tags url with integers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue: Using integer as tags (e.g. 2025) is supported by hugo, but printf here converts it to `sint2025`. An easy client-side solution would be to add quotes to the tag `"2025"`, but it's not intuitive. Instead, we let hugo choose how to do the conversion. Working tags: - `NoSpace` => `tags/nospace/` - `Two Words` => `tags/two-words/` - `2025` => `tags/2025/` - `2025.1` => `tags/2025.1/` - `1/2` => `tags/1/2/` - `✔️` => `tags/%EF%B8%8F/` Breaking change: - `1\2` => `tags/1/2` but was and should be `tags/1\2` (or `tags/1%5C2`) IMO we can ignore this case, which can produce other weird behaviours --- layouts/_default/index.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/_default/term.html | 2 +- layouts/partials/single_basic.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/_default/index.html b/layouts/_default/index.html index f7669d1..6fbf5a4 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -36,7 +36,7 @@ {{ if .Params.tags }} {{ range .Params.tags }} - # + # {{- . -}}   {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d0ebaae..93a2e10 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -26,7 +26,7 @@ {{ if .Params.tags }} {{ range .Params.tags }} - # + # {{- . -}}   {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8681d5f..207deae 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -25,7 +25,7 @@ {{ if .Params.tags }} {{ end }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 5ce11c2..883ced9 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -25,7 +25,7 @@ {{ if .Params.tags }}