Commented out hit counter for now

This commit is contained in:
Marcus 2024-10-15 00:13:17 +00:00
parent 859ec57f70
commit 52a727af42
3 changed files with 34 additions and 0 deletions

View File

@ -22,6 +22,8 @@ params:
url: "https://mnw.sdf.org"
favicon: favicon.ico
lazy_load_images: true
# hit counter
# goatcounter: "mnw"
schema:
blog:
"@context": "http://schema.org"

View File

@ -0,0 +1,21 @@
{{ define "main" -}}
<div class="post">
{{ partial "post/info.html" . }}
{{ .Content }}
{{ if (.Site.Params.listmonk) }}
{{ partial "post/listmonk_email_newsletters.html" . }}
{{ end }}
{{ partial "post/navigation.html" . }}
{{ if or (.Site.Params.remark42) (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "post/comments.html" . }}
{{ end }}
{{- if .Site.Params.goatcounter }}
{{ partial "analytics.html" . -}}
{{- end}}
</div>
{{- end }}
{{ define "sidebar" }}
{{ if and (not .Params.hideToc) (not .Site.Params.hideToc) }}
{{ partial "table_of_contents.html" . }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,11 @@
<div>There's still time for <div id="stats"></div> of you to escape. <3 </div>
<script>
var r = new XMLHttpRequest();
r.addEventListener('load', function() {
document.querySelector('#stats').innerText = JSON.parse(this.responseText).count
})
r.open('GET', 'https://{{ .Site.Params.goatcounter }}.goatcounter.com/counter/' + encodeURIComponent(location.pathname) + '.json')
r.send()
</script>