brainbaking/themes/brainbaking-minimal/layouts/partials/js.html

25 lines
904 B
HTML

{{- $mainScriptPath := "js/brainbaking.js" }}
{{- $scripts := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }}
<script src = '{{ $scripts.Permalink }}'></script>
<script src = '/js/simple-lightbox.min.js'></script>
<script src="/js/brainbaking.js"></script>
{{- if (ne hugo.Environment "development") }}
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, 'https://fathom.brainbaking.com/tracker.js', 'fathom');
fathom('set', 'siteId', '{{ .Site.Params.fathomid }}');
fathom('trackPageview');
</script>
<!-- / Fathom -->
{{- end }}