From 3bddd3fd942a264cdc07ab20b819d8a3a4bed0e4 Mon Sep 17 00:00:00 2001
From: Martin Hellspong <martin.hellspong@factor10.com>
Date: Wed, 04 Jan 2023 19:31:26 +0000
Subject: [PATCH] Add custom title / translation of tags (#754)
---
layouts/posts/single.html | 2 +-
layouts/partials/taxonomy/tags.html | 2 +-
exampleSite/content/tags/shortcodes/_index.pt-br.md | 5 +++++
CONTRIBUTORS.md | 1 +
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index f27db83..86654c4 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -122,3 +122,4 @@
- [Nour Agha](https://github.com/nourkagha)
- [Brian Lachniet](https://github.com/blachniet)
- [ShortArrow](https://github.com/ShortArrow)
+- [Martin Hellspong](https://github.com/marhel)
diff --git a/exampleSite/content/tags/shortcodes/_index.pt-br.md b/exampleSite/content/tags/shortcodes/_index.pt-br.md
new file mode 100644
index 0000000..8ceb230
--- /dev/null
+++ b/exampleSite/content/tags/shortcodes/_index.pt-br.md
@@ -0,0 +1,5 @@
+---
+title: "Códigos curtos"
+date: 2023-01-04T11:51:36+01:00
+draft: false
+---
diff --git a/layouts/partials/taxonomy/tags.html b/layouts/partials/taxonomy/tags.html
index 1be1ec0..47fc5f2 100644
--- a/layouts/partials/taxonomy/tags.html
+++ b/layouts/partials/taxonomy/tags.html
@@ -5,7 +5,7 @@
<span class="separator">•</span>
{{- end }}
<span class="tag">
- <a href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
+ <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
</span>
{{- end -}}
</div>
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index 3ddcf88..38fd3b9 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -27,7 +27,7 @@
</div>
{{ with .Page.Params.Authors }}{{ partial "taxonomy/authors.html" . }}{{ end }}
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }}
- {{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
+ {{ with .GetTerms "tags" }}{{ partial "taxonomy/tags.html" . }}{{ end }}
</div>
</header>
--
Gitblit v1.10.0