fediversity_website/themes/nluug/layouts/partials/scripts_loadlast.html

11 lines
504 B
HTML
Raw Normal View History

2023-05-18 13:03:01 +02:00
{{ $assetBusting := not .Site.Params.disableAssetsBusting }}
{{ $scripts := getJSON "assets/js/scripts.json" }}
{{ $.Scratch.Set "jslibs" slice }}
2023-06-01 10:43:59 +02:00
2023-05-18 13:03:01 +02:00
{{ range $scripts.scripts }}
2023-06-01 10:43:59 +02:00
{{ $.Scratch.Add "jslibs" (resources.Get . ) }}
2023-05-18 13:03:01 +02:00
{{ end }}
{{ $js := .Scratch.Get "jslibs" | resources.Concat "js/combined-scripts.js" | resources.Minify | fingerprint }}
<script src="{{ $js.RelPermalink }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" crossorigin="anonymous" integrity="{{ $js.Data.Integrity }}"></script>