From 29e90e8ac131a181ea0acd5a21faa643109e1cbc Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 24 Apr 2024 14:53:00 +0200 Subject: Removed unnecessary math.js load --- layouts/partials/head.html | 3 +++ layouts/partials/head/js.html | 14 ++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a16d7ea..962ebf4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,6 +4,9 @@ {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} +{{ if .Param "math" }} +{{ partialCached "math.html" . }} +{{ end }} {{ if hugo.IsProduction }} {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 18fe842..8bae509 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -1,12 +1,6 @@ {{- with resources.Get "js/main.js" }} - {{- if eq hugo.Environment "development" }} - {{- with . | js.Build }} - - {{- end }} - {{- else }} - {{- $opts := dict "minify" true }} - {{- with . | js.Build $opts | fingerprint }} - - {{- end }} - {{- end }} +{{- $opts := dict "minify" true }} +{{- with . | js.Build $opts | fingerprint }} + {{- end }} +{{- end }} \ No newline at end of file -- cgit v1.2.3