summaryrefslogtreecommitdiffhomepage
path: root/layouts/partials/scripts.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r--layouts/partials/scripts.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
new file mode 100644
index 000000000..b6f9696d3
--- /dev/null
+++ b/layouts/partials/scripts.html
@@ -0,0 +1,12 @@
+<script src="/js/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
+<script src="/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
+{{ $jsBase := resources.Get "js/base.js" }}
+{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }}
+{{ $js := (slice $jsBase $jsSearch) | resources.Concat "js/main.js" }}
+{{ if .Site.IsServer }}
+<script src="{{ $js.RelPermalink }}"></script>
+{{ else }}
+{{ $js := $js | minify | fingerprint }}
+<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
+{{ end }}
+{{ partial "hooks/body-end.html" . }}