Skip to content

Commit

Permalink
Fix processing of scss (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman authored Mar 12, 2024
1 parent fded150 commit 53d5ceb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@

{{- range $sass -}}
{{ with . }} <!-- Skips nil elements from appending empty resources.Match slices. -->
{{- $targetFile := printf "%s.scss" . -}}
{{- $targetFile := printf "%s.css" .RelPermalink -}}
{{- if $inServerMode -}}
{{ $css := resources.Get . | resources.ExecuteAsTemplate $targetFile $page | toCSS $cssOpts -}}
{{ $css := resources.ExecuteAsTemplate $targetFile $page . | toCSS $cssOpts -}}
<link rel="stylesheet" type="text/css" href="{{ $css.RelPermalink }}">
{{ else }}
{{ $css := resources.Get . | resources.ExecuteAsTemplate $targetFile $page | toCSS $cssOpts | minify | fingerprint -}}
{{ $css := resources.ExecuteAsTemplate $targetFile $page . | toCSS $cssOpts | minify | fingerprint -}}
<link rel="stylesheet" type="text/css" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 53d5ceb

Please sign in to comment.