Switched to featured image

This commit is contained in:
2020-11-02 22:56:12 +01:00
parent 10941c4f5e
commit 3e54d30fa1
+2 -2
View File
@@ -1,8 +1,8 @@
{{ $header_image := partial "func/GetNamedImage.html" (dict "context" . "name" "header_image") }} {{ $header_image := partial "func/GetNamedImage.html" (dict "context" . "name" "featured_image") }}
{{$image_resource := $header_image }} {{$image_resource := $header_image }}
{{ if $image_resource }} {{ if $image_resource }}
{{ $header_img := $image_resource.Resize "1200x" }} {{ $header_img := $image_resource.Fill "1200x600 Center" }}
{{ $image_url := $header_img.Permalink }} {{ $image_url := $header_img.Permalink }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $image_url := (trim $image_url "/") | absURL }} {{ $image_url := (trim $image_url "/") | absURL }}