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

github.com/vaga/hugo-theme-m10c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien CASTERS <fabien@vaga.io>2019-01-29 02:01:26 +0300
committerFabien CASTERS <fabien@vaga.io>2019-01-29 02:01:26 +0300
commitab7280993a77469bcc3ad20b18a28e2d4d071034 (patch)
tree02a4e61ad8c5b3dbd53694fb5298714771bf8c72 /layouts
parentf9b6b5feba1d88086bbfa8cea8efca9bf1c42bbe (diff)
Remove the tags meta part when no tag is present
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html9
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">