mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
⚡ Perf: optimize code
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
{{- $categories := slice -}}
|
||||
{{- range .Params.categories -}}
|
||||
{{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
|
||||
{{- $categories = $categories | append (printf `<a href="%v">%v %v</a>` (replace $category.RelPermalink "#" "%23") (dict "Class" "fa-regular fa-folder fa-fw" | partial "plugin/icon.html") $category.Title) -}}
|
||||
{{- $categories = $categories | append (printf `<a href="%v">%v %v</a>` (partial "function/escapeurl.html" $category.RelPermalink) (dict "Class" "fa-regular fa-folder fa-fw" | partial "plugin/icon.html") $category.Title) -}}
|
||||
{{- end -}}
|
||||
{{- with delimit $categories " " -}}
|
||||
<span class="post-category">
|
||||
@@ -70,7 +70,7 @@
|
||||
{{- range $value := . -}}
|
||||
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
|
||||
{{- with $tag -}}
|
||||
<a href='{{ replace .RelPermalink "#" "%23" }}' class="post-tag">{{ .Title }}</a>
|
||||
<a href='{{ partial "function/escapeurl.html" .RelPermalink }}' class="post-tag">{{ .Title }}</a>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user