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

github.com/yanlinlin82/simple-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinlin Yan <yanlinlin82@gmail.com>2019-12-19 03:21:42 +0300
committerLinlin Yan <yanlinlin82@gmail.com>2019-12-19 03:21:42 +0300
commit7d9ba08084ccaa2a794ba792f3c5c3b073789d59 (patch)
treebc88a04aa0e0f1e20f4f3efe054932668542f5d8
parentc7d8db9bf4bf6b3d7f7594716420c050c730d174 (diff)
Improve to list tags
-rw-r--r--layouts/_default/single.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 9a70507..cf67696 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,10 +6,14 @@
{{ if .Date -}}
<div>{{ .Date.Format "2006-01-02 15:04" }}</span>
{{ end -}}
- {{ if .Params.tags -}}
+ {{ $taxo := "tags" -}}
+ {{ if .Param $taxo -}}
<div>
- {{ range .Params.tags -}}
- <span><a href="{{ "tags/" | relLangURL }}{{ . | urlize }}/">#{{ . }}</a></span>
+ {{ range .Param $taxo -}}
+ {{ $name := . -}}
+ {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) -}}
+ <span><a href="{{ .Permalink }}">#{{ $name }}</a></span>
+ {{ end -}}
{{ end -}}
</div>
{{ end -}}