Use predefined header image if not set

This commit is contained in:
Luca Beltrame 2021-01-13 00:03:20 +01:00
parent d9ffe631ee
commit 4bee95386b
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

View file

@ -1,4 +1,4 @@
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
{{ $featured_image := partial "func/GetFeaturedImage.html" . | default "/images/banner.jpg" }}
{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }}