mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Use comma delimiting for series and tags
This commit is contained in:
parent
b2036d3bfe
commit
6d456768fa
@ -1,10 +1,12 @@
|
||||
{{ with .Params.series }}
|
||||
{{ with (.GetTerms "series") }}
|
||||
|
||||
{{ $series := slice }}
|
||||
{{ range . }}
|
||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="series">
|
||||
{{ range ($.GetTerms "series") }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "files" }}
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "icon.html" "files" }}
|
||||
{{ delimit $series ", " }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,8 +1,14 @@
|
||||
{{ with (.GetTerms "tags") }}
|
||||
|
||||
{{ $tags := slice }}
|
||||
{{ range . }}
|
||||
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="tags">
|
||||
{{ range (.GetTerms "tags") }}
|
||||
{{ partial "icon.html" "tag" }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "tag" }}
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ delimit $tags ", " }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user