hextra/layouts/partials/head-css.html

11 lines
576 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 }}