aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/head-js.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-01-13 20:33:21 -0500
committertdro <tdro@noreply.example.com>2024-01-13 20:33:21 -0500
commiteaaff9e2cf95bd05e0554bed2996b3e8252edba7 (patch)
tree50381535b86f13df060a40400b505a53538ffc4b /themes/default/layouts/partials/head-js.html
parente3f2fd696060de3d6f70c6eab77bd5d358c82c87 (diff)
downloadcanory-eaaff9e2cf95bd05e0554bed2996b3e8252edba7.tar.gz
canory-eaaff9e2cf95bd05e0554bed2996b3e8252edba7.tar.bz2
canory-eaaff9e2cf95bd05e0554bed2996b3e8252edba7.zip
themes/default/layouts/partials: base -> head
Diffstat (limited to 'themes/default/layouts/partials/head-js.html')
-rw-r--r--themes/default/layouts/partials/head-js.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/head-js.html b/themes/default/layouts/partials/head-js.html
new file mode 100644
index 0000000..a491eee
--- /dev/null
+++ b/themes/default/layouts/partials/head-js.html
@@ -0,0 +1,8 @@
+{{- $index := resources.Get "js/index.js" -}}
+{{- $js := $index | resources.Minify | fingerprint -}}
+
+{{ if .Site.Params.site.production }}
+<script src="{{ $js.Permalink }}"></script>
+{{ else }}
+<script src="{{ $index.Permalink }}"></script>
+{{ end }}