parent
479a4d8ebc
commit
8ff3722780
9 changed files with 69 additions and 4 deletions
@ -1,13 +1,16 @@ |
||||
+++ |
||||
author = "Maik de Kruif" |
||||
title = "{{ replace .Name "-" " " | title }}" |
||||
subtitle = "" |
||||
# showPageViews = false |
||||
date = {{ .Date }} |
||||
description = "" |
||||
images = [] |
||||
cover = "img/writeups/google-ctf/2021/beginners-quest/10/cover.png" |
||||
tags = [ |
||||
"untagged", |
||||
] |
||||
categories = [ |
||||
"uncategorized", |
||||
] |
||||
# aliases = [] |
||||
+++ |
||||
|
@ -0,0 +1,16 @@ |
||||
{{- if .Site.Params.goatCounter }} |
||||
<span id="{{ .File.UniqueID }}" title="{{ i18n "post.pageViews" }}">{{ i18n "post.unknownViews" }}</span> |
||||
<script async> |
||||
let url = |
||||
"https://{{ .Site.Params.goatCounter }}/counter/" + |
||||
encodeURIComponent({{ .RelPermalink }}.replace(/(\/)?$/, "")) + |
||||
".json"; |
||||
|
||||
fetch(url) |
||||
.then(res => res.json()) |
||||
.then(data => data.count) |
||||
.then(count => { |
||||
document.getElementById("{{ .File.UniqueID }}").innerText = count + " " + {{ i18n "post.pageViews" }}; |
||||
}); |
||||
</script> |
||||
{{- end}} |
Loading…
Reference in new issue