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 }}" />
|
<meta property="og:image" content="{{ if .IsHome }}{{ .Site.Params.cover }}{{ else }}{{ .Params.Cover }}{{ end }}" />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" true) }}
|
{{ with resources.Get "scss/imports.scss" }}
|
||||||
{{ $scss := resources.Get "scss/imports.scss" }}
|
{{ $opts := dict "outputStyle" "compressed" "enabledSourceMap" true "transpiler" "libsass" "targetPath" "css/style.css" }}
|
||||||
{{ $style := $scss | resources.ToCSS $options }}
|
{{ with . | toCSS $opts }}
|
||||||
<link rel="preload" href="{{ $style.RelPermalink }}?{{ now.Unix }}" as="style">
|
{{ if hugo.IsDevelopment }}
|
||||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}?{{ now.Unix }}">
|
<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" . }}
|
{{ partialCached "favicons.html" . }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue