mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
feat: delay PostCSS processing with resources.PostProcess
resources.PostProcess delays processing of a resource until the rest of the build has finished. This allows the public folder or Hugo's hugo_stats.json file to be used as the content for PurgeCSS, so that only CSS that is used on the final website will be included. Close #2318
This commit is contained in:
1 parent
70cef473ae
commit
01a25ecaec
1 file changed
+4
@@ -198,6 +198,10 @@
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $style = $style | fingerprint "md5" -}}
|
||||
{{- end -}}
|
||||
{{- if eq (getenv "WC_POST_CSS") "true" -}}
|
||||
{{/* PostProcess must be last action in the pipeline */}}
|
||||
{{- $style = $style | resources.PostProcess -}}
|
||||
{{- end -}}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
|
||||
|
||||
{{ partial "marketing/google_analytics" . }}
|
||||
|
||||
Reference in new issue
Block a user