diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-12-21 21:34:02 -0330 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-12-21 21:34:02 -0330 |
| commit | ad1bb9787eb2317571cd3d1bfcd5a8b22df4803f (patch) | |
| tree | 9b5dba33f39458f9bec6824db59f26870251d521 /themes/aoidh/layouts/_partials/head/js.html | |
| download | samanthony.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.html | 16 |
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 }} |