diff --git a/exampleSite/content/author/admin/_index.md b/exampleSite/content/author/admin/_index.md index 2d66b5ec..6076d93c 100644 --- a/exampleSite/content/author/admin/_index.md +++ b/exampleSite/content/author/admin/_index.md @@ -2,6 +2,9 @@ # Display name name = "Nelson Bighetti" +# Username (this should match the folder name) +authors = ["admin"] + # Is this the primary user of the site? superuser = true diff --git a/i18n/en.yaml b/i18n/en.yaml index 36036355..9d58f952 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -74,7 +74,10 @@ - id: education translation: Education - + +- id: user_profile_latest + translation: Latest + # Accomplishments widget - id: see_certificate diff --git a/layouts/author/list.html b/layouts/author/list.html index 6abcc011..fe512e22 100644 --- a/layouts/author/list.html +++ b/layouts/author/list.html @@ -16,18 +16,23 @@ {{ with $.Site.GetPage (printf "/author/%s" (urlize .Title)) }} {{ partial $widget $params }} {{ end }} + + {{ $query := where .Pages ".IsNode" false }} + {{ $count := len $query }} + {{ if $count }}
-

{{ i18n "related" }}

+

{{ i18n "user_profile_latest" | default "Latest" }}

+ {{ end }} diff --git a/layouts/partials/widgets/people.html b/layouts/partials/widgets/people.html index 56eff205..8913fc2e 100644 --- a/layouts/partials/widgets/people.html +++ b/layouts/partials/widgets/people.html @@ -25,7 +25,10 @@ {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{/* Get link to user's profile page. */}} - {{ $link := printf "/authors/%s" (path.Base (path.Split .Path).Dir) | relURL }} + {{ $link := "" }} + {{ with $.Site.GetPage (printf "/authors/%s" (path.Base (path.Split .Path).Dir)) }} + {{ $link = .RelPermalink }} + {{ end }}
{{ $src := "" }} {{ if $.Site.Params.gravatar }} @@ -35,11 +38,11 @@ {{ $src = $avatar_image.RelPermalink }} {{ end }} {{ if $src }} - Avatar + {{with $link}}{{end}}Avatar{{if $link}}{{end}} {{ end }}
-

{{ .Params.name }}

+

{{with $link}}{{end}}{{ .Params.name }}{{if $link}}{{end}}

{{ with .Params.role }}

{{ . | markdownify | emojify }}

{{ end }} {{ with .Params.interests }}

{{ delimit . ", " | markdownify | emojify }}

{{ end }}