summaryrefslogtreecommitdiffstats
path: root/layouts/_partials/head/css.html
blob: 889786684b135047e67ad224236dd49b68279aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{- with resources.Get "css/main.css" }}
  {{- $opts := dict
    "minify" (cond hugo.IsDevelopment false true)
    "sourceMap" (cond hugo.IsDevelopment "linked" "none")
  }}
  {{- with . | css.Build $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 }}