{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
{{- with resources.Get "css/main.scss" }}
  {{- if eq hugo.Environment "development" }}
    {{- with . | toCSS $opts | fingerprint }}
      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
    {{- end }}
  {{- else }}
    {{- with . | toCSS $opts | minify | fingerprint }}
      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
    {{- end }}
  {{- end }}
{{- end }}
