You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.0 KiB
28 lines
1.0 KiB
{{- $main := resources.Get "js/main.js" }}
|
|
{{- $menu := resources.Get "js/menu.js" }}
|
|
{{- $theme := resources.Get "js/theme.js" }}
|
|
{{- $nav := resources.Get "js/nav.js" }}
|
|
{{- $image_enlargement := resources.Get "js/image_enlargement.js" }}
|
|
{{- $secureJS := slice $main $menu $theme $nav $image_enlargement | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
|
|
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
|
|
|
{{- if .Site.GoogleAnalytics }}
|
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
function gtag() {
|
|
dataLayer.push(arguments);
|
|
}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
|
</script>
|
|
{{- end }}
|
|
|
|
{{- range $val := $.Site.Params.customJS }}
|
|
{{- if gt (len $val) 0 }}
|
|
<script src="{{ $val }}"></script>
|
|
{{- end }}
|
|
{{- end }} |