diff options
| author | 2026-02-10 17:11:24 +0300 | |
|---|---|---|
| committer | 2026-02-10 20:08:10 +0300 | |
| commit | 2ecb959c5b9c2b0750212af0349fd6d4a5c25258 (patch) | |
| tree | 16b3268b7dd825a13d4d8c0eb00007cc7f9a8ac1 /layouts/_partials/head/js.html | |
| download | base-master.tar.gz base-master.tar.bz2 base-master.tar.xz base-master.zip | |
Diffstat (limited to '')
| -rw-r--r-- | layouts/_partials/head/js.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/layouts/_partials/head/js.html b/layouts/_partials/head/js.html new file mode 100644 index 0000000..1b7c18e --- /dev/null +++ b/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 }} -->
\ No newline at end of file |
