Files
blog/themes/caldwell-59/layouts/_partials/head/js.html
Nikolaos Karaolidis 952ea88fc8 Add hugo base
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-08-04 11:47:03 +02:00

21 lines
559 B
HTML

{{- 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 }}