aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/themes/hugo-xmag/layouts/partials/author.html
blob: c4977ab40660b9977f44af56d61d90afd243828e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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>
  {{ range $.Scratch.Get "author_info" }}
    <p>{{ . | markdownify }}</p>
  {{ end }}
</section>
{{ end }}

{{ end }}