diff options
Diffstat (limited to 'layouts/partials/author.html')
-rw-r--r-- | layouts/partials/author.html | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/layouts/partials/author.html b/layouts/partials/author.html index c5ed53d..c4977ab 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,10 +1,25 @@ {{ with .Params.author }} +{{ if eq (substr (jsonify .) 0 1) "["}} +{{ $.Scratch.Set "page_author" .}} +{{ else }} +{{ $.Scratch.Set "page_author" (slice .) }} +{{ end }} + +{{ $.Scratch.Set "author_info" slice }} {{ if $.Site.Data.authors }} +{{ range $.Scratch.Get "page_author" }} {{ with (index $.Site.Data.authors .) }} +{{ $.Scratch.Add "author_info" . }} +{{ end }} +{{ end }} +{{ end }} +{{ if $.Scratch.Get "author_info" }} <section class="article-meta article-footer"> <h3>{{ default "About the Author" $.Site.Params.text.about_author }}</h3> - <p>{{ . | markdownify }}</p> + {{ range $.Scratch.Get "author_info" }} + <p>{{ . | markdownify }}</p> + {{ end }} </section> {{ end }} -{{ end }} + {{ end }} |