summaryrefslogtreecommitdiff
path: root/layouts/_partials/head/js.html
diff options
context:
space:
mode:
author2026-02-10 17:11:24 +0300
committer2026-02-10 20:08:10 +0300
commit2ecb959c5b9c2b0750212af0349fd6d4a5c25258 (patch)
tree16b3268b7dd825a13d4d8c0eb00007cc7f9a8ac1 /layouts/_partials/head/js.html
downloadbase-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.gz
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.bz2
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.xz
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.zip
Первый коммитHEADmaster
Diffstat (limited to '')
-rw-r--r--layouts/_partials/head/js.html16
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