From 0365a26f4ac7e2ac87cdc644f7c48a438679a1d9 Mon Sep 17 00:00:00 2001
From: drkhsh <me@drkhsh.at>
Date: Mon, 20 Jan 2025 22:49:49 +0100
Subject: [PATCH] minify js

---
 {static => assets}/js/menu.js | 0
 layouts/_default/baseof.html  | 6 ++++--
 2 files changed, 4 insertions(+), 2 deletions(-)
 rename {static => assets}/js/menu.js (100%)

diff --git a/static/js/menu.js b/assets/js/menu.js
similarity index 100%
rename from static/js/menu.js
rename to assets/js/menu.js
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 1064811..a044dc7 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -20,9 +20,11 @@
 		</div>
 		{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
 	</div>
-<script async defer src="{{ "js/menu.js" | relURL }}"></script>
+{{ $menuScript := resources.Get "js/menu.js" | resources.Minify -}}
+<script async defer src="{{ $menuScript.RelPermalink }}"></script>
 {{ range .Site.Params.customJS -}}
-<script src="{{ . | relURL }}"></script>
+{{ $customScript := resources.Get . | resources.Minify -}}
+<script async defer src="{{ $customScript.RelPermalink }}"></script>
 {{- end }}
 {{- partial "mathjax.html" . -}}
 </body>