From ac729cb14e7b5d795040ea5f077a3f5acf74cc1c Mon Sep 17 00:00:00 2001 From: Matt Spencer Date: Thu, 20 Jan 2022 16:06:21 +0000 Subject: [PATCH] Fix img shortcode Use .Page instead of .Site Pass through all the shortcode params unmodified Signed-off-by: Matt Spencer --- themes/soafee/layouts/shortcodes/img.html | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/themes/soafee/layouts/shortcodes/img.html b/themes/soafee/layouts/shortcodes/img.html index d14a2bf..52d8b5c 100644 --- a/themes/soafee/layouts/shortcodes/img.html +++ b/themes/soafee/layouts/shortcodes/img.html @@ -1,10 +1,2 @@ - -{{ $src := .Get "src" }} -{{ $alt := .Get "alt" | default "" }} -{{ $columns := .Get "columns" | default 1 }} - - -{{ $mediaPage := .Get "media_page" | default .Page.File.Path }} - -{{ partial "img" (dict "site" $.Site "src" $src "alt" $alt "columns" $columns "media_page" $mediaPage )}} +{{ partial "img" (dict "Page" .Page "ctx" .Params )}} -- GitLab