Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
css.html template cleanup (#90)
Browse files Browse the repository at this point in the history
There is no change in the generated site, I just moved the whitespace-trim marker from the front to the end of the template directives syntax.

Signed-off-by: Patrice Chalin <[email protected]>
  • Loading branch information
chalin authored Jul 26, 2021
1 parent 1acdad8 commit ffae4ac
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{- $inServerMode := site.IsServer }}
{{- $includePaths := (slice "node_modules") }}
{{- $sass := "sass/custom.sass" }}
{{- $cssOutput := "css/style.css" }}
{{- $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{- $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{- $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{- $css := resources.Get $sass | resources.ExecuteAsTemplate "blah.sass" . | toCSS $cssOpts }}
{{- if $inServerMode }}
{{ $inServerMode := site.IsServer -}}
{{ $includePaths := (slice "node_modules") -}}
{{ $sass := "sass/custom.sass" -}}
{{ $cssOutput := "css/style.css" -}}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) -}}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") -}}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts -}}
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate "blah.sass" . | toCSS $cssOpts -}}
{{ if $inServerMode -}}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- else }}
{{- $prodCss := $css | fingerprint }}
{{ else -}}
{{ $prodCss := $css | fingerprint -}}
<link rel="stylesheet" href="{{ $prodCss.RelPermalink }}" integrity="{{ $prodCss.Data.Integrity }}">
{{- end }}
{{ end -}}

0 comments on commit ffae4ac

Please sign in to comment.