From 48aa03bf100f292952dbd1d64eb7482b3ccf4a43 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 4 Dec 2022 07:33:52 -0500 Subject: [PATCH] Fix site-wide image resources --- themes/red/layouts/_default/_markup/render-image.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/red/layouts/_default/_markup/render-image.html b/themes/red/layouts/_default/_markup/render-image.html index df7870c..09ec5c7 100644 --- a/themes/red/layouts/_default/_markup/render-image.html +++ b/themes/red/layouts/_default/_markup/render-image.html @@ -5,6 +5,11 @@ {{ $path := path.Join .Page.File.Dir .Destination }} {{- $img = resources.Get $path -}} {{- end -}} + +{{- if and (not $img) .Page.File -}} + {{- $img = resources.Get .Destination -}} +{{- end -}} + {{- with $img -}}