lestoitsduval/layouts/partials/js.html

11 lines
578 B
HTML

{{ $targetPath := "js/main.js" }}
{{ $main := resources.Get $targetPath }}
{{ with $main }}
{{ $js := . | resources.Minify }}
<script type="text/javascript" src="{{ $js.Permalink }}"></script>
{{ end }}
{{ if or (eq hugo.Environment "production") (eq hugo.Environment "staging") }}
<script defer data-api="/api/event" data-domain="{{if eq hugo.Environment "staging" }}staging.{{ end }}lestoitsduval.fr" src="/js/script.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
{{ end }}