layout/default: use Hugo to bundle the JS files

This commit is contained in:
liushuyu 2022-05-07 16:44:24 -06:00
parent f286ee6320
commit 95be508e27
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437

View File

@ -101,7 +101,8 @@
</footer>
</div>
<script src="{{ .Site.BaseURL }}/js/script.js"></script>
{{ $mainJs := resources.Match "js/**.js" | resources.Concat "js/script.js" | minify | fingerprint }}
<script src="{{ $mainJs.Permalink }}" integrity="{{ $mainJs.Data.Integrity }}"></script>
{{- block "scripts" . }}{{- end }}
{{- if eq (getenv "HUGO_ENV") "PRD" }}