From bd24f961208541ff32cfcb9a8b49d4ca830448ae Mon Sep 17 00:00:00 2001 From: Alexandre CHAZAL Date: Mon, 8 Aug 2022 16:25:13 +0100 Subject: [PATCH] feat(theme): add preloads and defers --- layouts/_default/baseof.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 693c3b8..b8813c5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -16,9 +16,11 @@ {{ printf `` .Rel .MediaType.Type .Permalink $.Title | safeHTML }} {{ end -}} {{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}} + {{- block "head" . -}}{{- end }} {{- range .Site.Params.customCSS }} + {{- end }} {{- if templates.Exists "partials/extra-head.html" -}} @@ -35,10 +37,10 @@ {{ if .Site.Params.code_copy_button | default true -}} {{ $codeCopy := resources.Get "js/code-copy.js" -}} {{ $script := slice $main $codeCopy | resources.Concat "js/bundle.js" | minify | fingerprint -}} - + {{ else -}} {{ $script := $main | minify | fingerprint -}} - + {{ end }} {{- partial "analytics.html" . }}