{{/* Use this method to have Parcel process CSS */}}
{{ $css := resources.Get "output/index.css" | minify }}
{{ with $css }}
{{ $securecss := . | resources.Fingerprint }}
{{ end }}
{{/*
Use this method to have Hugo process PostCSS
{{ $css := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify }}
{{ with $css }}
{{ $securecss := . | resources.Fingerprint }}
{{ end }}
*/}}
{{ if (fileExists "./assets/output/index.css") }}
{{/* If we have an index.css file, it's for fonts. So process it with Pipes */}}
{{ $fonts_css := resources.Get "output/index.css" }}
{{ with $fonts_css }}
{{ $fonts_securecss := . | resources.Fingerprint }}
{{ end }}
{{/* And, Parcel generates the files to the output directory. Grab those files to create Prefetch links, and using Pipes, also puts them in our public folder */}}
{{ $path := "./assets/output" }}
{{ $files := readDir $path }}
{{ range $files }}
{{/* You may want to narrow the range to something more specific */}}
{{ if in .Name "woff" }}
{{ $file := resources.Get (printf "%s%s" "output/" .Name) }}
{{ end }}
{{ end }}
{{ end }}