Only use generated image for Event type if no image was defined in frontmatter data

This commit is contained in:
Michael Boelen 2024-10-20 18:07:28 +00:00
parent 44168d0998
commit 7d0418f427

View file

@ -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 }}