mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 15:58:53 +00:00
Rename scratch var
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
44193f267d
commit
696fa92e11
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user