Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Support Array-style post author
Browse files Browse the repository at this point in the history
A very stupid implementation. Need further inspect.
  • Loading branch information
nykma committed Nov 25, 2022
1 parent a8540e6 commit cb4641a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion layouts/partials/head/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@
{{- with .Params.author | default .Site.Author.name | default (T "author") -}}
"author": {
"@type": "Person",
"name": {{ . | safeHTML }}
"name":
{{ if (eq "[]string" (printf "%T" .) ) }}
{{ delimit . ", " }}
{{ else }}
{{ . }}
{{ end }}
},
{{- end -}}
"description": {{ .Description | safeHTML }}
Expand Down
8 changes: 6 additions & 2 deletions layouts/partials/plugin/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
{{- partial "plugin/icon.html" . -}}
{{- end -}}
{{- with .Content -}}
{{- . | safeHTML -}}
{{ if (eq "[]string" (printf "%T" .) ) }}
{{ delimit . ", " }}
{{ else }}
{{ . }}
{{ end }}
{{- end -}}
</a>
</a>

0 comments on commit cb4641a

Please sign in to comment.