add ShowAuthor param

This commit is contained in:
Reorx 2022-04-21 17:32:29 +08:00
parent 9377da773c
commit 2628a07c95
1 changed files with 2 additions and 0 deletions

View File

@ -12,9 +12,11 @@
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "<span>%d words</span>" .WordCount))) }} {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "<span>%d words</span>" .WordCount))) }}
{{- end }} {{- end }}
{{- if (.Param "ShowAuthor") -}}
{{- with (partial "author.html" .) }} {{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }} {{- $scratch.Add "meta" (slice .) }}
{{- end }} {{- end }}
{{- end }}
{{- with ($scratch.Get "meta") }} {{- with ($scratch.Get "meta") }}
{{- delimit . "<span class=\"delimiter\">&nbsp;·&nbsp;</span>" -}} {{- delimit . "<span class=\"delimiter\">&nbsp;·&nbsp;</span>" -}}