Skip to content

Commit 5450936

Browse files
committed
Merge branch 'v0.17' of github.com:okkur/syna
2 parents 7130b6e + 9577538 commit 5450936

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

layouts/partials/head.html

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,23 @@
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 }}

0 commit comments

Comments
 (0)