Minify and fingerprint local Bootstrap files

This commit is contained in:
Will Faught
2022-12-29 22:13:02 -08:00
parent af33efb158
commit 950dac7b9c
2 changed files with 12 additions and 0 deletions

View File

@@ -18,7 +18,11 @@ resize();
addEventListener("resize", resize);
</script>
{{ with .Site.Params.paige.bootstrap.scripts_path }}
{{ with resources.Get (relLangURL .) }}
<script defer src="{{ (. | minify | fingerprint).RelPermalink }}"></script>
{{ else }}
<script defer src="{{ relLangURL . }}"></script>
{{ end }}
{{ else }}
<script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
{{ end }}