How to minify CSS from `/static` on build-time? Also, merging CSS files together

Thank you, @rokh.
I had to modify it slightly to enforce loading of CSS files in a specific order:

{{ $stylea := resources.Get "css/style-a.css" }}
{{ $styleb := resources.Get "css/style-b.css" }}
{{ $stylec := resources.Get "css/style-c.css" }}
{{ $css := slice $styleb $stylec $stylea | resources.Concat "css/style.css" | minify }}
2 Likes