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:
parent
9ffa94f8af
commit
14babf16eb
1 changed files with 4 additions and 0 deletions
|
@ -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") }}
|
||||
<!---->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue