dc09-hugo/themes/qogir/layouts/partials/head/css.html

13 lines
525 B
HTML
Raw Permalink Normal View History

{{- $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 }}