{{ $page := .page }} {{ $author_urlized := .username }} {{ $site_type := site.Params.site_type | default "Person" }} {{ $taxonomy := "authors" }} {{ $profile_page := site.GetPage (printf "/%s/%s" $taxonomy $author_urlized) }} {{ with $profile_page }} {{ if isset .Params "superuser" }}{{/* Check an author profile exists. */}} {{/* 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 (eq $site_type "Person") (eq .Params.superuser true) }} {{ $profile_url = site.BaseURL }} {{ end }} {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{ $avatar_shape := site.Params.avatar.shape | default "circle" }}
{{ if and site.Params.avatar.gravatar .Params.email }} {{.Title}} {{ else if $avatar }} {{ $avatar_image := $avatar.Fill "270x270 Center" }} {{.Title}} {{ end }}
{{.Title}}
{{ with .Params.role }}
{{. | markdownify | emojify}}
{{end}} {{ with .Params.bio }}

{{. | markdownify | emojify}}

{{end}} {{ partial "social_links" . }}
{{end}} {{end}}{{/* Profile page block */}}