mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
If authors taxonomy is enabled, link to it in metadata
This commit is contained in:
parent
4e27a6ce8a
commit
8ada21c609
@ -27,7 +27,20 @@
|
|||||||
{{ with .Params.authors }}
|
{{ with .Params.authors }}
|
||||||
<span class="post-meta-item">
|
<span class="post-meta-item">
|
||||||
{{ partial "icon.html" "user-circle" }}
|
{{ partial "icon.html" "user-circle" }}
|
||||||
|
|
||||||
|
{{ if index $.Site.Taxonomies "authors" }}
|
||||||
|
|
||||||
|
{{ $authors := slice }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ $url := (printf "/authors/%s" (. | anchorize)) | absLangURL }}
|
||||||
|
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url . | safeHTML) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ delimit $authors ", " }}
|
||||||
|
|
||||||
|
{{ else }}
|
||||||
{{ delimit . ", " }}
|
{{ delimit . ", " }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user