From c8ef81fc808aeb9f08a026ab292c81a66bb585f4 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Fri, 23 Jun 2023 11:40:47 +0200 Subject: [PATCH] Aanvullen sameAs met social media en indien van toepassing persoonlijke website --- .../partials/schemas/schema_Person.html | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/themes/nluug/layouts/partials/schemas/schema_Person.html b/themes/nluug/layouts/partials/schemas/schema_Person.html index 6bd6b3f..91a314a 100644 --- a/themes/nluug/layouts/partials/schemas/schema_Person.html +++ b/themes/nluug/layouts/partials/schemas/schema_Person.html @@ -1,8 +1,31 @@ {{ $author := index .Site.Data.personen (substr $.File.LogicalName 0 -3) }} {{ $location := index .Site.Data.location .Site.Params.primarylocation }} +{{ $sameas := slice }} +{{ if $author.sameas }}{{ $sameas = $sameas | append ($author.sameas) }}{{ end }} +{{ if $author.websites }} + {{ range index ($author.websites) }} + {{ if eq .sameas true }} + {{ $sameas = $sameas | append (.url) }} + {{ end }} + {{ end }} +{{ end }} +{{ if $author.social }} + {{ if $author.social.github }} + {{ $sameas = $sameas | append (printf "https://github.com/%s" $author.social.github) }} + {{ end }} + {{ if $author.social.linkedin }} + {{ $sameas = $sameas | append ($author.social.linkedin) }} + {{ end }} + {{ if $author.social.mastodon }} + {{ $sameas = $sameas | append ($author.social.mastodon_url) }} + {{ end }} + {{ if $author.social.twitter }} + {{ $sameas = $sameas | append (printf "https://twitter.com/%s" $author.social.twitter) }} + {{ end }} +{{ end }}