diff options
author | Fabien CASTERS <fabien@vaga.io> | 2019-01-29 02:01:26 +0300 |
---|---|---|
committer | Fabien CASTERS <fabien@vaga.io> | 2019-01-29 02:01:26 +0300 |
commit | ab7280993a77469bcc3ad20b18a28e2d4d071034 (patch) | |
tree | 02a4e61ad8c5b3dbd53694fb5298714771bf8c72 /layouts | |
parent | f9b6b5feba1d88086bbfa8cea8efca9bf1c42bbe (diff) |
Remove the tags meta part when no tag is present
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9c36f61..7027351 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -11,15 +11,16 @@ {{ partial "icon.html" "clock" }} {{ .ReadingTime }} min read </div> + {{- with .Params.tags -}} <div> {{ partial "icon.html" "tag" }} - {{ range .Param "tags" -}} - {{- $name := . -}} - {{- with $.Site.GetPage (printf "/%s/%s" "tags" $name) -}} - <a class="tag" href="{{ .Permalink }}">{{ $name }}</a> + {{ range . -}} + {{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}} + <a class="tag" href="{{ .Permalink }}">{{ .Title }}</a> {{- end -}} {{- end -}} </div> + {{- end -}} </div> </header> <div class="post-content"> |