fix(path): broken tag/category link when containing a dot (#368)
This commit is contained in:
3
layouts/partials/function/path.html
Normal file
3
layouts/partials/function/path.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{- /* https://discourse.gohugo.io/t/how-decode-urls-in-hugo/7549/4 */ -}}
|
||||
{{- $URL := . | urlize | urls.Parse -}}
|
||||
{{- return $URL.Path -}}
|
||||
@@ -51,7 +51,7 @@
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
{{- $tag := $value | anchorize | printf "/tags/%v" | $.Site.GetPage -}}
|
||||
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
|
||||
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user