diff --git a/modules/blox/layouts/_partials/jsonld/article.html b/modules/blox/layouts/_partials/jsonld/article.html index d494ef615..84f27d3f8 100644 --- a/modules/blox/layouts/_partials/jsonld/article.html +++ b/modules/blox/layouts/_partials/jsonld/article.html @@ -1,6 +1,6 @@ {{- $page := .page }} {{ $summary := .summary }} -{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} +{{ $featured_image := partial "functions/get_featured_image" $page }} {{/* Get schema type. */}} {{ $schema := "Article" }} diff --git a/modules/blox/layouts/_partials/jsonld/event.html b/modules/blox/layouts/_partials/jsonld/event.html index 03629e0bd..6d2be5350 100644 --- a/modules/blox/layouts/_partials/jsonld/event.html +++ b/modules/blox/layouts/_partials/jsonld/event.html @@ -1,6 +1,6 @@ {{ $page := .page }} {{ $summary := .summary }} -{{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} +{{ $featured_image := partial "functions/get_featured_image" $page }} {{ $author := partial "functions/get_author_name" $page }}