{{- $scriptsBody := slice }} {{- range resources.Match "js/core/*.js" -}} {{ $scriptsBody = $scriptsBody | append (resources.ExecuteAsTemplate .Name $ .) }} {{- end -}} {{- $scripts := $scriptsBody | resources.Concat "js/main.js" -}} {{- if hugo.IsProduction -}} {{- $scripts = $scripts | minify | fingerprint -}} {{- end -}}