File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 5252 {{- $sassTemplate := resources.Get "styles/index.scss" -}}
5353 {{- $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules" "styles")) -}}
5454 {{- $styleTemplated := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . -}}
55- {{- $style := $styleTemplated | resources.ToCSS $options | resources.PostCSS | resources.Minify | resources.Fingerprint | resources.PostProcess }}
56- < link href ="{{ $style.Permalink }} " rel ="stylesheet ">
55+ {{- if hugo.IsProduction -}}
56+ {{- if .Site.Params.postcss -}}
57+ {{- $style := $styleTemplated | resources.ToCSS $options | resources.PostCSS | resources.Minify | resources.Fingerprint | resources.PostProcess }}
58+ < link href ="{{ $style.Permalink }} " rel ="stylesheet ">
59+ {{- else -}}
60+ {{- $style := $styleTemplated | resources.ToCSS $options | resources.Minify | resources.Fingerprint }}
61+ < link href ="{{ $style.Permalink }} " rel ="stylesheet ">
62+ {{- end -}}
63+ {{- else -}}
64+ {{- if .Site.Params.postcss -}}
65+ {{- $style := $styleTemplated | resources.ToCSS $options | resources.PostCSS | resources.PostProcess }}
66+ < link href ="{{ $style.Permalink }} " rel ="stylesheet ">
67+ {{- else -}}
68+ {{- $style := $styleTemplated | resources.ToCSS $options }}
69+ < link href ="{{ $style.Permalink }} " rel ="stylesheet ">
70+ {{- end -}}
71+ {{- end -}}
5772
5873 {{- with .Site.Params.custom -}}
5974 {{- with .favicon }}
You can’t perform that action at this time.
0 commit comments