X-Git-Url: https://git.danix.xyz/?a=blobdiff_plain;f=layouts%2Fpartials%2Fhead-addition.html;h=42eff423c826d918bcdc5f4a8f0513fbafd29bd1;hb=1bb5bdce0e57a62c05a3b6cbb49890acc2a94152;hp=475d3b41cc3e0536aa560b3117bdd0d9530b8052;hpb=8158405efe1b0475196c27e9acba9a3e569810c4;p=theme-danix.xyz.git diff --git a/layouts/partials/head-addition.html b/layouts/partials/head-addition.html index 475d3b4..42eff42 100644 --- a/layouts/partials/head-addition.html +++ b/layouts/partials/head-addition.html @@ -2,11 +2,15 @@ * Add the featured image to the header if it's present in the Front Matter */}} {{ if .IsPage }} - {{ if isset .Params "featured_image" }} - + {{ with $.Params.featured_image }} + {{ with resources.Get . }} + + {{ else }} + {{ warnf "featured image not found: %s" . }} + {{ end }} {{ end }} {{ end }}