Standardize featured_image logic (#473)

This commit is contained in:
Troy Lindsay 2021-12-31 11:29:32 -06:00
parent 57e38aad38
commit ea28a86a6d
No known key found for this signature in database
GPG Key ID: C82B6E26104FA540

View File

@ -1,4 +1,4 @@
{{ $featured_image := .Param "featured_image"}}
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
{{ 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 }}