I am trying to build my own theme. I have a partial named global-styles.html
for styling the theme as follows:
{{ $fonts := resources.Get "fonts.css" | resources.ExecuteAsTemplate "fonts.css" . | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $fonts.RelPermalink }}" {{ printf "integrity=%q" $fonts.Data.Integrity | safeHTMLAttr }}>
{{ $style := resources.Get "scss/base.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }}>
The partial works fine. But I would like to modify it with as result one single css file by using the resources.Concat
feature but I did not succeed to have a proper syntax. Something likes slice $fonts $style | resources.Concat "styles.css"
.
As my coding skills are very limited, any help would be very appreciated.
Thank you in advance