Update template for more recent Hugo
This commit is contained in:
parent
52762fb14a
commit
ab658a8750
|
@ -38,11 +38,20 @@
|
|||
<meta property="og:image" content="{{ if .IsHome }}{{ .Site.Params.cover }}{{ else }}{{ .Params.Cover }}{{ end }}" />
|
||||
|
||||
<!-- Styles -->
|
||||
{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $scss := resources.Get "scss/imports.scss" }}
|
||||
{{ $style := $scss | resources.ToCSS $options }}
|
||||
<link rel="preload" href="{{ $style.RelPermalink }}?{{ now.Unix }}" as="style">
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}?{{ now.Unix }}">
|
||||
{{ with resources.Get "scss/imports.scss" }}
|
||||
{{ $opts := dict "outputStyle" "compressed" "enabledSourceMap" true "transpiler" "libsass" "targetPath" "css/style.css" }}
|
||||
{{ with . | toCSS $opts }}
|
||||
{{ if hugo.IsDevelopment }}
|
||||
<link rel="preload" href="{{ .RelPermalink }}" as="style">
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ with . | minify | fingerprint }}
|
||||
<link rel="preload" href="{{ .RelPermalink }}" as="style">
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "favicons.html" . }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue