Do the same for page resource scripts as for page resource CSS files

Look up page resources matching *.js and include all of them as deferred module
scripts.
This commit is contained in:
Eryn Wells 2022-08-16 09:13:38 -07:00
parent 9ffa94f8af
commit 14babf16eb

View file

@ -50,6 +50,10 @@
<script defer src="{{ `scripts/railroad-utils.js` | absURL }}"></script>
{{ end }}
{{ range $script := .Resources.Match "*.js" }}
<script defer type="module" src="{{ $script.Permalink | relURL }}"></script>
{{ end }}
<!-- Misc -->
{{ if or hugo.IsProduction (eq site.Params.env "production") }}
<!---->