diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3f8a07ec..742b52ae 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,6 @@ - - {{/* Title */}} {{ if .IsHome -}} {{ .Site.Title | emojify }} @@ -11,24 +9,16 @@ {{ .Title | emojify }} · {{ .Site.Title | emojify }} {{- end }} - {{/* Metadata */}} - - {{ with union .Site.Params.keywords .Params.keywords -}} - - {{- end }} - {{ with .Site.Params.robots }} - - {{ end }} - {{ with .Params.robots }} - - {{ end }} - - {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }} - {{ end -}} {{/* Asset bundles */}} {{ $assets := newScratch }} {{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }} + {{ $jsAppearance := resources.Get "js/appearance.js" }} + {{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint $algorithm }} + {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }} {{ if not $cssScheme }} {{ $cssScheme = resources.Get "css/schemes/congo.css" }} @@ -47,9 +37,6 @@ href="{{ $bundleCSS.RelPermalink }}" integrity="{{ $bundleCSS.Data.Integrity }}" /> - {{ $jsAppearance := resources.Get "js/appearance.js" }} - {{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint $algorithm }} - {{ if .Site.Params.enableSearch | default false }} {{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }} {{ $jsSearch := resources.Get "js/search.js" }} @@ -65,8 +52,42 @@ {{ end }} {{ if $assets.Get "js" }} {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint $algorithm }} - + {{ end }} + {{/* Metadata */}} + + {{ with union .Site.Params.keywords .Params.keywords -}} + + {{- end }} + {{ with .Site.Params.robots }} + + {{ end }} + {{ with .Params.robots }} + + {{ end }} + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }} + {{ end -}} {{/* Icons */}} {{ if templates.Exists "partials/favicons.html" }} {{ partialCached "favicons.html" .Site }} @@ -76,6 +97,7 @@ {{ end }} + {{/* Site Verification */}} {{ with .Site.Params.verification.google }}