diff options
author | vvveiii <cntrump@gmail.com> | 2020-05-03 14:19:39 +0300 |
---|---|---|
committer | vvveiii <cntrump@gmail.com> | 2020-05-03 14:19:39 +0300 |
commit | 5f51eabf63a042adadb95b85208dcc13eac2c4e7 (patch) | |
tree | 51a25590f7f7bd2a3bcfdeb2c261d7508c368363 | |
parent | 02e8c066dca3dd35915f472e8c2ff59b72e76c9a (diff) |
Support setting author in front matter
-rw-r--r-- | layouts/partials/article-author.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/article-author.html b/layouts/partials/article-author.html index 5584927..8564819 100644 --- a/layouts/partials/article-author.html +++ b/layouts/partials/article-author.html @@ -1,4 +1,9 @@ -{{- with site.Params.author -}} +{{- $author := .Params.author -}} +{{- if not $author -}} + {{- $author = site.Params.author -}} +{{- end -}} + +{{- with $author -}} {{- if .enable -}} <section class="article author"> {{- with .avatar -}}<img class="avatar" src="{{- . | relURL -}}" alt>{{- end -}} |