{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.css" "includePaths" (slice "node_modules/")) | resources.PostCSS (dict "config" "postcss.config.js") }} {{/* Page-specific styles set via front matter, scoped via SCSS and inlined */}} {{- with .Params.css -}} {{/* NOTE: This file doesn't end up getting published (which is good) */}} {{- $target := path.Join $.File.Dir "css/inline.scss" -}} {{- $css := . | resources.FromString $target | resources.ToCSS | resources.PostCSS (dict "config" "postcss.config.js") -}} {{/* Already being minified to my taste by PostCSS above */}} {{ printf "" | safeHTML -}} {{- printf "" | safeHTML }} {{ end -}}