scss: improve the scss pipe
- Adds the fingerprint of the processed css files. Co-Authored-by: iGor milhit <igor@milhit.ch>dev
parent
0c6ae76ed9
commit
83f45fefff
|
@ -18,12 +18,12 @@
|
||||||
"targetPath" "styles.css"
|
"targetPath" "styles.css"
|
||||||
"includePaths" (slice "node_modules")
|
"includePaths" (slice "node_modules")
|
||||||
) -}}
|
) -}}
|
||||||
{{- $styles := resources.Get "scss/main.scss" | toCSS $options | minify -}}
|
{{- $styles := resources.Get "scss/main.scss" | toCSS $options | minify | fingerprint -}}
|
||||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
|
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ $options := (dict "targetPath" "print.css" ) -}}
|
{{ $options := (dict "targetPath" "print.css" ) -}}
|
||||||
{{- $print := resources.Get "css/gutenberg.css" | toCSS $options | minify -}}
|
{{- $print := resources.Get "css/gutenberg.css" | toCSS $options | minify | fingerprint -}}
|
||||||
<link rel="stylesheet" href="{{ $print.Permalink }}" media="print">
|
<link rel="stylesheet" href="{{ $print.Permalink }}" integrity="{{ $print.Data.Integrity }}" media="print">
|
||||||
{{ range .AlternativeOutputFormats }}
|
{{ range .AlternativeOutputFormats }}
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue