21 lines
671 B
HTML
21 lines
671 B
HTML
{{ range resources.Match "css/*.scss" }}
|
|
{{ with resources.Get . }}
|
|
{{ $name := . }}
|
|
{{ $opts := dict
|
|
"enableSourceMap" hugo.IsDevelopment
|
|
"outputStyle" (cond hugo.IsDevelopment "expanded" "compressed")
|
|
"targetPath" (replace $name ".scss" ".css")
|
|
"transpiler" "dartsass"
|
|
"vars" site.Params.styles
|
|
}}
|
|
{{ with . | toCSS $opts }}
|
|
{{ if hugo.IsDevelopment }}
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
|
{{ else }}
|
|
{{ with . | fingerprint }}
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|