Update head.html
Based on https://gohugo.io/hugo-pipes/transpile-sass-to-css/
This commit is contained in:
parent
1546e90987
commit
09f5539451
1 changed files with 3 additions and 11 deletions
|
@ -22,17 +22,9 @@
|
|||
{{ end }}
|
||||
|
||||
<!-- CSS -->
|
||||
{{ with resources.Get "sass/main.scss" }}
|
||||
{{ $opts := dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true }}
|
||||
{{ with . | toCSS $opts }}
|
||||
{{ if hugo.IsDevelopment }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ with . | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $opts := dict "transpiler" "libsass" "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true }}
|
||||
{{ with resources.Get "scss/main.scss" | toCSS $opts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue