new posts and layouts from thailand
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{{ printf "%#v" . }}
|
||||
{{/* Step 1: A default image as fallback */}}
|
||||
{{ $image := "/images/placeholder.png" }}
|
||||
|
||||
{{/* Step 2: now check if passed image exists with same as title */}}
|
||||
{{ $image_url := .Resources.Match .ImageSrc }}
|
||||
{{ $img_param := .ImgParam }}
|
||||
{{ if $image_url }}
|
||||
{{/* Resize and convert the image */}}
|
||||
{{ $image_url = $image_url.Resize $img_param }}
|
||||
{{ $image = $image_url.RelPermalink }}
|
||||
{{end}}
|
||||
|
||||
{{return .ImageSrc}}
|
||||
Reference in New Issue
Block a user