{{/* Author profile box */}} {{ if not (or (eq site.Params.profile false) (eq .Params.profile false)) }} {{/* Display superuser if superuser exists and page authors are not explicitly specified. */}} {{/* Otherwise, display first author if a profile for them exists. */}} {{ $author_urlized := "" }} {{ if and (not .Params.authors) (.Scratch.Get "superuser_username") }} {{ $author_urlized = (.Scratch.Get "superuser_username") }} {{ else }} {{ $first_author := "" }} {{ if .Params.authors }} {{ $first_author = index .Params.authors 0 }} {{ end }} {{ $author_urlized = urlize $first_author }} {{ end }} {{ $taxonomy := "authors" }} {{ $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $author_urlized) }} {{ with $profile_page }} {{/* If it's a personal site and primary page author is superuser, link to the homepage rather than their profile page. */}} {{ $profile_url := .RelPermalink }} {{ if and (not site.Data.organization.name) (eq .Params.superuser true) }} {{ $profile_url = site.BaseURL }} {{ end }} {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
{{ with $avatar }} {{ $avatar_image := $avatar.Fill "250x250 Center" }} Avatar {{ end }}
{{.Params.name}}
{{ with .Params.role }}
{{. | markdownify | emojify}}
{{end}} {{ with .Params.bio }}

{{. | markdownify | emojify}}

{{end}}
{{end}}{{/* Profile page block */}} {{end}}{{/* Show profile block */}}