hugo-theme-introduction/layouts/partials/footer/scripts.html
Hanzei 986d249391
Bundle assets
Update dependencies
2018-07-13 10:55:02 +02:00

15 lines
967 B
HTML

{{ $jQuery := resources.Get "vendor/jquery/jquery-3.3.1.min.js" }}
{{ $index := resources.Get "js/index.js" | resources.ExecuteAsTemplate "js/index.tmp.css" . | minify }}
{{ if and .Site.Params.localTime .Page.IsHome }}
{{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }}
{{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
{{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
{{ $scripts := slice $jQuery $momentjs $momentTimezone $momentTimezoneWithData $index | resources.Concat "/js/bundleMoment.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
{{ else }}
{{ $scripts := slice $jQuery $index | resources.Concat "/js/bundle.js" | fingerprint }}
<script src="{{ $scripts.Permalink }}" integrity="{{ $scripts.Data.Integrity }}"></script>
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}