From 7d0418f4277539af80fe2f4c537346a5747df44a Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 20 Oct 2024 18:07:28 +0000 Subject: [PATCH] Only use generated image for Event type if no image was defined in frontmatter data --- themes/nluug/layouts/partials/schemas/schema_Event.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/nluug/layouts/partials/schemas/schema_Event.html b/themes/nluug/layouts/partials/schemas/schema_Event.html index 42563b9..68d10ab 100755 --- a/themes/nluug/layouts/partials/schemas/schema_Event.html +++ b/themes/nluug/layouts/partials/schemas/schema_Event.html @@ -12,8 +12,6 @@ {{ else }} "eventStatus": "EventScheduled", {{ end }} -{{- $featured := partial "opengraph/get-featured-image.html" . }} - "image": "{{ $featured.Permalink }}", "organizer": [ { "@type": "Organization", @@ -63,7 +61,10 @@ {{ $image.Permalink -}} {{- end }} ], - {{ end -}} +{{ else }} +{{- $featured := partial "opengraph/get-featured-image.html" . }} + "image": "{{ $featured.Permalink }}", +{{ end -}} {{ $list := where .Pages "Params.speakers" "!=" nil }} {{ if gt (len $list) 0 }}"subEvent": [{{ end }} {{ range $key, $value := $list }}