Only use generated image for Event type if no image was defined in frontmatter data
This commit is contained in:
parent
44168d0998
commit
7d0418f427
1 changed files with 4 additions and 3 deletions
|
@ -12,8 +12,6 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
"eventStatus": "EventScheduled",
|
"eventStatus": "EventScheduled",
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- $featured := partial "opengraph/get-featured-image.html" . }}
|
|
||||||
"image": "{{ $featured.Permalink }}",
|
|
||||||
"organizer": [
|
"organizer": [
|
||||||
{
|
{
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
|
@ -63,6 +61,9 @@
|
||||||
{{ $image.Permalink -}}
|
{{ $image.Permalink -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
],
|
],
|
||||||
|
{{ else }}
|
||||||
|
{{- $featured := partial "opengraph/get-featured-image.html" . }}
|
||||||
|
"image": "{{ $featured.Permalink }}",
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ $list := where .Pages "Params.speakers" "!=" nil }}
|
{{ $list := where .Pages "Params.speakers" "!=" nil }}
|
||||||
{{ if gt (len $list) 0 }}"subEvent": [{{ end }}
|
{{ if gt (len $list) 0 }}"subEvent": [{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue