From fe422905b07bf4798e0f0389165c6a5798946634 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 29 May 2019 22:12:20 +0100 Subject: [PATCH] feat: for personal sites, link an article's profile box to homepage See #982 --- layouts/partials/page_author.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/layouts/partials/page_author.html b/layouts/partials/page_author.html index bdb9c8da..288f878d 100644 --- a/layouts/partials/page_author.html +++ b/layouts/partials/page_author.html @@ -19,6 +19,11 @@ {{ $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*" }}
{{ if and site.Params.gravatar .Params.email }} @@ -29,7 +34,7 @@ {{ end }}
-
{{.Params.name}}
+
{{.Params.name}}
{{ with .Params.role }}
{{. | markdownify | emojify}}
{{end}} {{ with .Params.bio }}

{{. | markdownify | emojify}}

{{end}}