Skip to content

Commit dbb2c31

Browse files
author
张天赐
committed
fix: 展示作者名称
1 parent 6cf3e08 commit dbb2c31

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

layouts/partials/author.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- if or .Params.author site.Params.author }}
2+
{{- $author := (.Params.author | default site.Params.author) }}
3+
{{- $author_type := (printf "%T" $author) }}
4+
{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }}
5+
{{- (delimit $author ", " ) }}
6+
{{- else }}
7+
{{- $author }}
8+
{{- end }}
9+
{{- end -}}

0 commit comments

Comments
 (0)