Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/halogenica/beautifulhugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Romero <halogenica@users.noreply.github.com>2019-09-05 07:54:51 +0300
committerGitHub <noreply@github.com>2019-09-05 07:54:51 +0300
commit3f32f6fde6e7c33a50d3abc35a294eea96de5b9b (patch)
tree793c1b4e843731ef83ad68cf4704dc18a3f80df4 /layouts
parentb9996ebf9b3961cb91b5df70cd13b24d2862f344 (diff)
parent865e7a5edf31c38a5ff292bea57d72f38dfce534 (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.html10
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 }}
&nbsp;|&nbsp;<i class="fas fa-book"></i>&nbsp;{{ .WordCount }}&nbsp;{{ i18n "words" }}
{{ end }}
- {{ 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 }}
+ {{ 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;