Merge pull request #268 from lzhoucs/hide-author

Add option `showAuthor` to hide author
This commit is contained in:
Michael Romero 2019-09-04 21:54:51 -07:00 committed by GitHub
commit 3f32f6fde6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,11 +11,13 @@
{{ if .Site.Params.wordCount }}
&nbsp;|&nbsp;<i class="fas fa-book"></i>&nbsp;{{ .WordCount }}&nbsp;{{ i18n "words" }}
{{ end }}
{{ if .Site.Params.showAuthor }}
{{ if .Params.author }}
&nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Params.author | safeHTML }}
{{ else }}
&nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Site.Author.name | safeHTML }}
{{ end }}
{{ end }}
{{- if .Site.Params.staticman -}}
&nbsp;|&nbsp;<i class="fas fa-comment"></i>&nbsp;
{{ $slug := replace .RelPermalink "/" "" }}