lestoitsduval/layouts/partials/js.html

11 lines
615 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="https://analytiques.resilien.cloud/js/plausible.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
{{ end }}