{{ $page := .page }} {{ $author_page := .author_page }} {{ $site_type := site.Params.marketing.seo.site_type | default "Person" }} {{- $has_profile := not (eq nil $author_page.Params.superuser) -}} {{/* Check an author profile exists. */}} {{ if $has_profile }} {{/* If it's a personal site and primary page author is superuser, link to the homepage rather than their profile page. */}} {{ $profile_url := $author_page.RelPermalink }} {{ if and (eq $site_type "Person") (eq $author_page.Params.superuser true) }} {{ $profile_url = site.BaseURL }} {{ end }} {{ $avatar := ($author_page.Resources.ByType "image").GetMatch "*avatar*" }} {{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }}
{{end}}{{/* Profile page block */}}