diff --git a/layouts/partials/func/GetFeaturedImage.html b/layouts/partials/func/GetFeaturedImage.html index 1c8dd3b..5ceeb15 100644 --- a/layouts/partials/func/GetFeaturedImage.html +++ b/layouts/partials/func/GetFeaturedImage.html @@ -20,7 +20,17 @@ {{ $matches := "feature,cover" }} {{/* Use the value from front matter if present */}} {{ with .Params.featured_image }} - {{ $coverImage = . }} + {{/* If we find a remote global Resource matching the exact value, we use it. */}} + {{ if (hasPrefix . "http") }} + {{ with resources.GetRemote . }} + {{ $coverImage = . }} + {{ end }} + {{ else }} + {{/* If we find a local global Resource matching the exact value, we use it. */}} + {{ with resources.Get . }} + {{ $coverImage = . }} + {{ end }} + {{ end }} {{/* If we find a Page Resource matching the exact value, we use it instead. */}} {{ with $.Resources.GetMatch . }} {{ $coverImage = . }}