mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 02:38:27 -04:00
extract fathom snippet into separate partial template
This commit is contained in:
parent
f27d1c48b7
commit
cc9e2b4f23
@ -50,18 +50,6 @@
|
||||
<h1>Welp, this is awkward... 😳</h1>
|
||||
<p>The file you asked for wasn't found in this neck of the woods. Please check the URL for mistakes and try again, or take your ball and <a href="{{ .Site.BaseURL }}">go home</a>.</p>
|
||||
</div>
|
||||
<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.jarv.is/tracker.js', 'fathom');
|
||||
fathom('set', 'siteId', 'DYCXU');
|
||||
fathom('trackPageview');
|
||||
</script>
|
||||
{{ if eq hugo.Environment "production" }}{{ partial "stats.html" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,16 +1,4 @@
|
||||
{{ if eq hugo.Environment "production" }}<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.jarv.is/tracker.js', 'fathom');
|
||||
fathom('set', 'siteId', 'DYCXU');
|
||||
fathom('trackPageview');
|
||||
</script>{{ end }}
|
||||
{{ if eq hugo.Environment "production" }}{{ partial "stats.html" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
13
layouts/partials/stats.html
Normal file
13
layouts/partials/stats.html
Normal file
@ -0,0 +1,13 @@
|
||||
<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.jarv.is/tracker.js', 'fathom');
|
||||
fathom('set', 'siteId', 'DYCXU');
|
||||
fathom('trackPageview');
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user