Standardize featured_image logic (#473) (#474)

This commit is contained in:
Troy Lindsay 2022-01-10 14:24:14 -06:00 committed by GitHub
parent fc9b2352db
commit 3789b8edae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 }}