mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -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") }}
|
||||||
<div class="series">
|
|
||||||
{{ range ($.GetTerms "series") }}
|
{{ $series := slice }}
|
||||||
<span class="post-meta-item">
|
{{ range . }}
|
||||||
{{ partial "icon.html" "files" }}
|
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="series">
|
||||||
|
{{ partial "icon.html" "files" }}
|
||||||
|
{{ delimit $series ", " }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
<div class="tags">
|
{{ with (.GetTerms "tags") }}
|
||||||
{{ range (.GetTerms "tags") }}
|
|
||||||
<span class="post-meta-item">
|
{{ $tags := slice }}
|
||||||
{{ partial "icon.html" "tag" }}
|
{{ range . }}
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
</span>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="tags">
|
||||||
|
{{ partial "icon.html" "tag" }}
|
||||||
|
<span class="post-meta-item">
|
||||||
|
{{ delimit $tags ", " }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user