diff options
author | Michael Romero <halogenica@users.noreply.github.com> | 2019-09-05 07:54:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 07:54:51 +0300 |
commit | 3f32f6fde6e7c33a50d3abc35a294eea96de5b9b (patch) | |
tree | 793c1b4e843731ef83ad68cf4704dc18a3f80df4 /layouts | |
parent | b9996ebf9b3961cb91b5df70cd13b24d2862f344 (diff) | |
parent | 865e7a5edf31c38a5ff292bea57d72f38dfce534 (diff) |
Merge pull request #268 from lzhoucs/hide-author
Add option `showAuthor` to hide author
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/post_meta.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index f7e03d7..70f52ba 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -11,10 +11,12 @@ {{ if .Site.Params.wordCount }} | <i class="fas fa-book"></i> {{ .WordCount }} {{ i18n "words" }} {{ end }} - {{ if .Params.author }} - | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} - {{ else }} - | <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }} + {{ if .Site.Params.showAuthor }} + {{ if .Params.author }} + | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} + {{ else }} + | <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }} + {{ end }} {{ end }} {{- if .Site.Params.staticman -}} | <i class="fas fa-comment"></i> |