Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'

This commit is contained in:
Bjørn Erik Pedersen
2025-02-13 10:40:34 +01:00
817 changed files with 5301 additions and 14766 deletions

View File

@@ -0,0 +1,28 @@
{{ $r := .r }}
{{ $attr := .attributes | default dict }}
{{ if hugo.IsDevelopment }}
<link
rel="stylesheet"
href="{{ $r.RelPermalink }}"
{{ template `render-attributes` $attr }} />
{{ else }}
{{ with $r | minify | fingerprint }}
<link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
{{ template `render-attributes` $attr }} />
{{ end }}
{{ end }}
{{ define "render-attributes" }}
{{- range $k, $v := . -}}
{{- if $v -}}
{{- printf ` %s=%q` $k $v | safeHTMLAttr -}}
{{- else -}}
{{- printf ` %s` $k | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{ end }}