diff --git a/wowchemy/layouts/partials/widgets/about.avatar.html b/wowchemy/layouts/partials/widgets/about.avatar.html new file mode 100644 index 00000000..82b563d3 --- /dev/null +++ b/wowchemy/layouts/partials/widgets/about.avatar.html @@ -0,0 +1,65 @@ +{{ $ := .root }} +{{ $page := .page }} + +{{ $author := "" }} +{{ if .author }} +{{ $author = .author }} +{{ else }} +{{ $author = $page.Params.author }} +{{end}} + +{{ $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://wowchemy.com/docs/page-builder/#about " $person_page_path }} +{{end}} +{{ $person := $person_page.Params }} +{{ $avatar := ($person_page.Resources.ByType "image").GetMatch "*avatar*" }} +{{ $avatar_shape := site.Params.avatar.shape | default "circle" }} + +