From 14babf16ebedc97bd97fe8fe8e66d857a6e06363 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 16 Aug 2022 09:13:38 -0700 Subject: [PATCH] Do the same for page resource scripts as for page resource CSS files Look up page resources matching *.js and include all of them as deferred module scripts. --- layouts/partials/head.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 89ab224..a985838 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,6 +50,10 @@ {{ end }} + {{ range $script := .Resources.Match "*.js" }} + + {{ end }} + {{ if or hugo.IsProduction (eq site.Params.env "production") }}