simoncor.net/themes/hugo-coder/layouts/partials/head/custom-styles.html
Simon Cornet 956e73d0e4
All checks were successful
Build and Publish / Build (push) Successful in 5s
Build and Publish / Deployment (push) Successful in 58s
[hugo] feat: update
2024-08-26 17:13:18 +02:00

22 lines
987 B
HTML

{{ range .Site.Params.customCSS }}
{{ if hugo.IsServer }}
{{ $styles := resources.Get . }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
{{ else }}
{{ $styles := resources.Get . | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
{{ end }}
{{ end }}
{{ range .Site.Params.customSCSS }}
{{/* We don't change the targetPath to because it's transparent to users */}}
{{ if hugo.IsServer }}
{{ $cssOpts := (dict "enableSourceMap" true ) }}
{{ $styles := resources.Get . | toCSS $cssOpts }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
{{ else }}
{{ $styles := resources.Get . | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" crossorigin="anonymous" media="screen" />
{{ end }}
{{ end }}