|
23 | 23 | {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} |
24 | 24 | {{- end }} |
25 | 25 | {{- $style := resources.Get "/scss/style.scss" }} |
26 | | - {{- $style = $style | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS $options }} |
| 26 | + {{- $style = $style | resources.ExecuteAsTemplate "/scss/style.scss" . | css.Sass $options }} |
27 | 27 | {{- if hugo.IsProduction }} |
28 | 28 | {{- $style = $style | minify | fingerprint "sha384" }} |
29 | 29 | {{- end -}} |
|
39 | 39 | {{ end }} |
40 | 40 | <script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end -}} defer></script> |
41 | 41 | <!-- Image Compare Viewer --> |
42 | | - {{ if .Site.Data.landing.image_compare.enable }} |
| 42 | + {{ if ($.Scratch.Get "image_compare_enabled") }} |
43 | 43 | {{ $imagecompare := resources.Get "js/image-compare-viewer.min.js" }} |
44 | | - {{- if not .Site.IsServer }} |
| 44 | + {{- if not hugo.IsServer }} |
45 | 45 | {{- $js := (slice $imagecompare) | resources.Concat "/js/image-compare.js" | minify | fingerprint "sha384" }} |
46 | 46 | <script type="text/javascript" src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script> |
47 | 47 | {{- else }} |
|
50 | 50 | {{- end }} |
51 | 51 | {{- end }} |
52 | 52 | <!-- Plausible Analytics Config --> |
53 | | - {{- if not .Site.IsServer }} |
| 53 | + {{- if not hugo.IsServer }} |
54 | 54 | {{ if and (.Site.Params.plausible.scriptURL) (.Site.Params.plausible.dataDomain) -}} |
55 | 55 | {{- partialCached "head/plausible" . }} |
56 | 56 | {{- end -}} |
57 | 57 | {{- end -}} |
58 | 58 | <!-- Google Analytics v4 Config --> |
59 | | - {{- if not .Site.IsServer }} |
60 | | - {{- if .Site.GoogleAnalytics }} |
| 59 | + {{- if not hugo.IsServer }} |
| 60 | + {{- if .Site.Config.Services.GoogleAnalytics.ID }} |
61 | 61 | {{- template "_internal/google_analytics.html" . -}} |
62 | 62 | {{- end -}} |
63 | 63 | {{- end -}} |
|
0 commit comments