{{/* Hugo Blox: Biography */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $author := $block.content.username | default "admin" }} {{ $person_page_path := (printf "/authors/%s" $author) }} {{ $person_page := site.GetPage $person_page_path }} {{ if not $person_page }} {{ errorf "Could not find an author page at `%s`. Please check the value of `author` in your About widget and create an associated author page if one does not already exist. See https://docs.hugoblox.com/page-builder/#about " $person_page_path }} {{end}} {{ $person := $person_page.Params }} {{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }} {{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }} {{ $img := "" }} {{with $block.design.banner.filename}} {{- $img = resources.Get (path.Join "media" .) -}} {{ if $img }} {{- $img = $img.Process "webp" -}}
{{ end }} {{ end }}
{{ if $avatar }}
{{ $avatar_image := $avatar.Fill "150x150 Center" }} {{$person_page.Title}} {{with $person.status.icon}}{{.|emojify}}{{end}}
{{ end }}
{{- if $person.name_pronunciation -}} {{ $person_page.Title }} {{ $person.name_pronunciation }} {{- else -}} {{- $person_page.Title -}} {{- end -}}
{{ with $person.role }}

{{ . | markdownify | emojify }}

{{ end }} {{ range $person.organizations }}
{{ with .url }}{{ end }}
{{ .name }}
{{ if .url }}
{{ end }}
{{ end }}
{{ with ($block.content.text | emojify | $page.RenderString) | default $person_page.Content }}
{{ . }}
{{ end }} {{ with $block.content.button }} {{.text}} {{ end }}