hextra/layouts/partials/head-css.html

15 lines
773 B
HTML
Raw Normal View History

{{ if and (not hugo.IsProduction) (eq hugo.Environment "theme")}}
{{ $styles := resources.Get "css/styles.css" }}
{{ $styles = $styles | resources.PostCSS (dict "inlineImports" true) }}
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
{{ else }}
{{ $styles := resources.Get "css/compiled/main.css" }}
{{ $styles = $styles | minify | fingerprint | resources.PostProcess }}
<link rel="preload" href="{{ $styles.RelPermalink }}" as="style" />
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" integrity="{{ $styles.Data.Integrity }}" />
{{ end }}
2023-08-21 23:37:49 +01:00
{{ $custom := resources.Get "css/custom.css" }}
{{ $custom = $custom | minify | fingerprint }}
<link href="{{ $custom.RelPermalink }}" rel="stylesheet" integrity="{{ $custom.Data.Integrity }}" />