{{/* only parse and append analytics script on production site */}} {{- $includeProdScripts := eq hugo.Environment "production" -}} {{- $darkmode := resources.Get "js/dark-mode.js" | resources.ExecuteAsTemplate "js/dark-mode.js" . -}} {{- $twemoji := resources.Get "js/vendor/twemoji.js" | resources.ExecuteAsTemplate "js/vendor/twemoji.js" . -}} {{- $bundle := slice $darkmode $twemoji -}} {{- if $includeProdScripts }} {{- $fathom := resources.Get "js/fathom.js" | resources.ExecuteAsTemplate "js/fathom.js" . }} {{- $bundle = slice $darkmode $twemoji $fathom }} {{- end }} {{- $js := $bundle | resources.Concat "/js/app.js" -}}