fix bug 404 of uppercase tag or category name

fix bug of 404 when the tag or category  name is uppercase

Signed-off-by: ḕℏỈẍȓ <ehlxr.me@gmail.com>
This commit is contained in:
ḕℏỈẍȓ 2022-12-12 10:40:00 +08:00 committed by GitHub
parent 86b9b5aa50
commit 7b7b50fe1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@
<ul class="category-list">
{{- range $name, $items := $cats }}
<li class="category-list-item">
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize | lower }}" data-pjax-state="">{{ .Page.Title }}</a>
<a class="category-list-link" href="{{ "/categories/" | relLangURL }}{{ $name | urlize }}" data-pjax-state="">{{ .Page.Title }}</a>
<span class="category-list-count">{{ len $items }}</span>
</li>
{{- end }}
@ -41,7 +41,7 @@
<div class="tag-cloud-tags">
{{ $randNums := (seq 10) }}
{{- range $name, $items := $tags }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize | lower }}">{{ .Page.Title }}
<a class="tag-cloud-{{ index (shuffle $randNums) 0 }}" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}">{{ .Page.Title }}
<span class="tag-list-count">
<sup>({{ len $items }})</sup>
</span>