diff --git a/static/js/sweetalert-2.1.2.min.js b/assets/js/sweetalert-2.1.2.min.js
similarity index 100%
rename from static/js/sweetalert-2.1.2.min.js
rename to assets/js/sweetalert-2.1.2.min.js
diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html
index ca53b77100..402b7c19da 100644
--- a/layouts/partials/hooks/body-end.html
+++ b/layouts/partials/hooks/body-end.html
@@ -6,7 +6,13 @@
{{ end }}
{{/* copy-and-paste helper for codenew shortcode */}}
{{- if or (.HasShortcode "code_sample") (.HasShortcode "code") (.HasShortcode "codenew") -}}
-
+ {{- if hugo.IsProduction -}}
+ {{- $sweetAlert := resources.Get "js/sweetalert-2.1.2.min.js" | minify | fingerprint -}}
+
+ {{- else -}}
+ {{- $sweetAlert := resources.Get "js/sweetalert-2.1.2.min.js" -}}
+
+ {{- end -}}