From b719568b2c2e2bfb52faea0d77b9c2bc1ca01e9e Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Fri, 20 May 2022 16:50:56 -0400 Subject: [PATCH] fix: js not executing if spa disabled --- layouts/partials/head.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a5f23da3..a49800be 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -61,13 +61,7 @@ links, content, })) - - {{if $.Site.Data.config.enableSPA}} - {{ $router := resources.Get "js/router.js" | resources.Fingerprint "md5" | - resources.Minify }} - + {{if $.Site.Data.config.enableSPA}} + {{ $router := resources.Get "js/router.js" | resources.Fingerprint "md5" | + resources.Minify }} + {{else}} - + {{end}} {{ template "_internal/google_analytics.html" . }}