From 1bf4d8aca6f81f2dddd0262e74b278cd9985b53d Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 8 Aug 2025 20:50:19 +0200 Subject: initial commit, basic setup --- layouts/partials/head/js.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 layouts/partials/head/js.html (limited to 'layouts/partials/head/js.html') diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html new file mode 100644 index 0000000..6123e7f --- /dev/null +++ b/layouts/partials/head/js.html @@ -0,0 +1,17 @@ +{{- with resources.Get "js/main.js" }} + {{- $opts := dict + "minify" (not hugo.IsDevelopment) + "sourceMap" (cond hugo.IsDevelopment "external" "") + "targetPath" "js/main.js" + }} + {{- with . | js.Build $opts }} + {{- if hugo.IsDevelopment }} + + {{- else }} + {{- with . | fingerprint }} + + {{- end }} + {{- end }} + {{- end }} +{{- end }} + -- cgit v1.2.3