mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 01:47:28 -05:00
Support categories again, but hopefully a bit better
This commit is contained in:
11
layouts/partials/post-meta-item/categories.html
Normal file
11
layouts/partials/post-meta-item/categories.html
Normal file
@ -0,0 +1,11 @@
|
||||
{{ with (.GetTerms "categories") }}
|
||||
{{ $categories := slice }}
|
||||
{{ range . }}
|
||||
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||
{{ partial "icon.html" "folder" }}
|
||||
{{ delimit $categories ", " }}
|
||||
</div>
|
||||
{{ end }}
|
@ -25,6 +25,7 @@
|
||||
{{ partial "post-meta-item/translations.html" . }}
|
||||
{{ partial "post-meta-item/readingtime.html" . }}
|
||||
{{ partial "post-meta-item/viewsource.html" . }}
|
||||
{{ partial "post-meta-item/categories.html" . }}
|
||||
{{ partial "post-meta-item/tags.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -13,6 +13,7 @@
|
||||
{{ partial "post-meta-item/translations.html" . }}
|
||||
{{ partial "post-meta-item/readingtime.html" . }}
|
||||
{{ partial "post-meta-item/series.html" . }}
|
||||
{{ partial "post-meta-item/categories.html" . }}
|
||||
{{ partial "post-meta-item/tags.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user