use Param instead of Params to get the featured image

This commit is contained in:
Fredrik Mile 2023-02-13 09:27:23 +01:00
parent a1a99cf126
commit 22e02298a8

View File

@ -19,7 +19,7 @@
{{ $linkToCover := "" }} {{ $linkToCover := "" }}
{{ $matches := "feature,cover" }} {{ $matches := "feature,cover" }}
{{/* Use the value from front matter if present */}} {{/* Use the value from front matter if present */}}
{{ with .Params.featured_image }} {{ with .Param "featured_image" }}
{{/* This is the default case, the image lives in the static directory. {{/* This is the default case, the image lives in the static directory.
In which case we'll use the static dir */}} In which case we'll use the static dir */}}
{{ $linkToCover = trim . "/" | absURL }} {{ $linkToCover = trim . "/" | absURL }}