2023-11-04 20:58:45 +04:00
|
|
|
{{- $file_from := printf "scss/%s.scss" .Css }}
|
|
|
|
{{- $file_to := printf "css/%s.css" .Css }}
|
|
|
|
{{- $options := dict "transpiler" "libsass" "targetPath" $file_to }}
|
|
|
|
{{- with resources.Get $file_from | toCSS $options }}
|
2023-11-04 11:44:43 +04:00
|
|
|
{{- if eq hugo.Environment "development" }}
|
|
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
|
|
|
{{- else }}
|
|
|
|
{{- with . | minify | fingerprint }}
|
|
|
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|