summaryrefslogtreecommitdiffstats
path: root/themes/aoidh/layouts/_partials/head/js.html
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-12-21 21:34:02 -0330
committerSam Anthony <sam@samanthony.xyz>2025-12-21 21:34:02 -0330
commitad1bb9787eb2317571cd3d1bfcd5a8b22df4803f (patch)
tree9b5dba33f39458f9bec6824db59f26870251d521 /themes/aoidh/layouts/_partials/head/js.html
downloadsamanthony.xyz-1.0.0.zip
init hugov1.0.0
Diffstat (limited to 'themes/aoidh/layouts/_partials/head/js.html')
-rw-r--r--themes/aoidh/layouts/_partials/head/js.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/themes/aoidh/layouts/_partials/head/js.html b/themes/aoidh/layouts/_partials/head/js.html
new file mode 100644
index 0000000..16ffbed
--- /dev/null
+++ b/themes/aoidh/layouts/_partials/head/js.html
@@ -0,0 +1,16 @@
+{{- 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 }}
+ <script src="{{ .RelPermalink }}"></script>
+ {{- else }}
+ {{- with . | fingerprint }}
+ <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}