From 9771c3d2b8d35a1b3ec5e27dbf855ef356b22aa9 Mon Sep 17 00:00:00 2001 From: Besser Sehen Landshut Date: Mon, 24 Aug 2026 05:34:17 +0200 Subject: [PATCH] fix(template): show tag display names instead of their slugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server-rendered templates print the slug of a tag where the interface prints its display name. For Latin-script tags the difference is a matter of case; for everything else the slug is a transliteration, so a page about a tag named 眼镜 renders as "yan-jing". Search engines see nothing but these pages, and so does every reader before the interface takes over. Changed in question.html, question-detail.html, tag-detail.html (both the heading and the list) and tags.html. Only the text, never the href — links go on using the slug. Co-Authored-By: Claude Opus 5 (1M context) --- ui/template/question-detail.html | 2 +- ui/template/question.html | 2 +- ui/template/tag-detail.html | 4 ++-- ui/template/tags.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/template/question-detail.html b/ui/template/question-detail.html index 6fd39b232..9772cfc2c 100644 --- a/ui/template/question-detail.html +++ b/ui/template/question-detail.html @@ -68,7 +68,7 @@

{{range .detail.Tags}} - {{.SlugName}} + {{.DisplayName}} {{end}} diff --git a/ui/template/question.html b/ui/template/question.html index db1358704..48c638e51 100644 --- a/ui/template/question.html +++ b/ui/template/question.html @@ -75,7 +75,7 @@

- {{.SlugName}} + {{.DisplayName}} {{end}} diff --git a/ui/template/tag-detail.html b/ui/template/tag-detail.html index 595614707..0762b7c27 100644 --- a/ui/template/tag-detail.html +++ b/ui/template/tag-detail.html @@ -25,7 +25,7 @@

- {{$.tag.SlugName}} + {{$.tag.DisplayName}}

{{formatLinkNofollow $.tag.ParsedText}}

@@ -80,7 +80,7 @@
{{range .Tags }} - {{.SlugName}} + {{.DisplayName}} {{end}}
diff --git a/ui/template/tags.html b/ui/template/tags.html index 075f4a31a..f72195ea0 100644 --- a/ui/template/tags.html +++ b/ui/template/tags.html @@ -54,7 +54,7 @@

{{.SlugName}} + class="">{{.DisplayName}}
{{formatLinkNofollow .ParsedText}}