ritual.sh/layouts/partials/site-scripts.html

18 lines
No EOL
973 B
HTML

{{ $script := .Site.Data.webpack_assets.app }}
{{ with $script.js }}
<script src="{{ relURL (printf "%s%s" "dist/" .) }}"></script>
{{ end }}
{{/* Terminal Scripts Partial */}}
{{/* This compiles all terminal JS files into a single minified bundle */}}
{{ $terminal := resources.Get "js/terminal.js" }}
{{ $lavalamp := resources.Get "js/lavalamp.js" }}
{{ $init := resources.Get "js/init.js" }}
{{ $coreCommands := resources.Get "js/commands/core.js" }}
{{ $utilityCommands := resources.Get "js/commands/utility.js" }}
{{ $navigationCommands := resources.Get "js/commands/navigation.js" }}
{{ $customCommands := resources.Get "js/commands/custom.js" }}
{{ $terminalBundle := slice $terminal $lavalamp $init $coreCommands $utilityCommands $navigationCommands $customCommands | resources.Concat "js/terminal-bundle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $terminalBundle.RelPermalink }}" integrity="{{ $terminalBundle.Data.Integrity }}"></script>