From 696fa92e11d0220abcdea921dc168824ef322d3e Mon Sep 17 00:00:00 2001 From: Salim B Date: Sat, 1 May 2021 20:06:32 +0200 Subject: [PATCH] Rename scratch var --- layouts/shortcodes/getcontent.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/getcontent.html b/layouts/shortcodes/getcontent.html index 02800fed7..7f92d7b2e 100644 --- a/layouts/shortcodes/getcontent.html +++ b/layouts/shortcodes/getcontent.html @@ -10,12 +10,12 @@ Usage: {{< getcontent path="PATH/TO/FILE" >}} {{ $scratch := newScratch -}} {{ with $glob -}} {{ $bundle := site.GetPage $path -}} - {{ $scratch.Set "pages" ($bundle.Resources.Match $glob) -}} + {{ $scratch.Set "resources" ($bundle.Resources.Match $glob) -}} {{ else -}} {{ $bundle := site.GetPage (path.Dir $path) -}} - {{ $scratch.Set "pages" ($bundle.Resources.Match (path.Base $path)) -}} + {{ $scratch.Set "resources" ($bundle.Resources.Match (path.Base $path)) -}} {{ end -}} -{{ range ($scratch.Get "pages") -}} +{{ range ($scratch.Get "resources") -}} {{ .Content }} {{ end -}}