Use comma delimiting on series-box in single.html

This commit is contained in:
BBaoVanC 2021-11-15 21:06:53 -06:00
parent 37c5a970c4
commit b2036d3bfe
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -8,14 +8,25 @@
{{ partial "post-metadata.html" . }} {{ partial "post-metadata.html" . }}
{{ with (.GetTerms "series") }} {{ with (.GetTerms "series") }}
{{ $series := slice }}
{{ range . }} {{ range . }}
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="series-box"> <div class="series-box">
{{ partial "icon.html" "info" }} {{ partial "icon.html" "info" }}
{{ if gt (len $series) 1 }}
This post is part of multiple series:
{{ else }}
This post is part of a series: This post is part of a series:
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</div>
{{ end }} {{ end }}
{{ delimit $series ", " }}
</div>
{{ end }} {{ end }}