Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvvveiii <cntrump@gmail.com>2020-04-09 19:03:19 +0300
committervvveiii <cntrump@gmail.com>2020-04-09 19:03:19 +0300
commitafa4d0326c2397f4ce40fa4c9ffd831aace9049f (patch)
tree4f106370ed146ef88ef6c56722e3c637cf0264f7 /layouts
parent8be8c8e64ff845f7eb9a3569f36263d73c446185 (diff)
Fix tags included '#' show 404 page.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/article-labels.html4
-rw-r--r--layouts/partials/note-labels.html4
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/article-labels.html b/layouts/partials/article-labels.html
index ec6799d..2ba4ff1 100644
--- a/layouts/partials/article-labels.html
+++ b/layouts/partials/article-labels.html
@@ -1,11 +1,11 @@
{{- if or .Params.categories .Params.tags -}}
<section class="article labels">
{{- range .Params.categories -}}
- {{- $url := print "/categories/" (. | urlize) "/" -}}
+ {{- $url := print "/categories/" ((replace . "#" "%23") | urlize) "/" -}}
<a class="category" href={{- $url | relLangURL -}}>{{- . -}}</a>
{{- end -}}
{{- range .Params.tags -}}
- {{- $url := print "/tags/" (. | urlize) "/" -}}
+ {{- $url := print "/tags/" ((replace . "#" "%23") | urlize) "/" -}}
<a class="tag" href={{- $url | relLangURL -}}>{{- . -}}</a>
{{- end -}}
</section>
diff --git a/layouts/partials/note-labels.html b/layouts/partials/note-labels.html
index 668b038..9606f7b 100644
--- a/layouts/partials/note-labels.html
+++ b/layouts/partials/note-labels.html
@@ -1,11 +1,11 @@
{{- if or .Params.categories .Params.tags -}}
<p class="note labels">
{{- range .Params.categories -}}
- {{- $url := print "/categories/" (. | urlize) "/" -}}
+ {{- $url := print "/categories/" ((replace . "#" "%23") | urlize) "/" -}}
<a class="category" href="{{- $url | relLangURL -}}">{{- . -}}</a>
{{- end -}}
{{- range .Params.tags -}}
- {{- $url := print "/tags/" (. | urlize) "/" -}}
+ {{- $url := print "/tags/" ((replace . "#" "%23") | urlize) "/" -}}
<a class="tag" href="{{- $url | relLangURL -}}">{{- . -}}</a>
{{- end -}}
</p>