You will have to modify the rest of your code as well, since $style
is now an array.
Something like
{{ $stylearr := slice }}
{{ range $components }}
{{ $stylearr = $stylearr | append . }}
{{ end }}
{{ $generatedstyle := $stylearr | resources.Concat "main.scss" | toCSS $options | minify | fingerprint }}
{{ $generatedstyle.Permalink }}