mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 09:58:28 -04:00
16 lines
536 B
HTML
16 lines
536 B
HTML
{{/* only parse and append analytics script on production site */}}
|
|
{{- $includeProdScripts := eq hugo.Environment "production" -}}
|
|
|
|
{{- $counter := resources.Get "js/counter.js" -}}
|
|
{{- $twemoji := resources.Get "js/vendor/twemoji.js" -}}
|
|
|
|
{{- $bundle := slice $counter $twemoji -}}
|
|
|
|
{{- if $includeProdScripts -}}
|
|
{{- $fathom := resources.Get "js/fathom.js" -}}
|
|
{{- $bundle = $bundle | append $fathom -}}
|
|
{{- end -}}
|
|
|
|
{{- $js := $bundle | resources.Concat "/js/app.js" -}}
|
|
<script async defer src="{{ $js.Permalink }}"></script>
|