Add umami analytics support

This commit is contained in:
Olof Nord 2022-04-06 16:38:38 +02:00
parent 49b6f15701
commit e984e2b0fb
2 changed files with 14 additions and 0 deletions

View File

@ -107,6 +107,10 @@ summaryLength = 70 # number of words for article summaries
plausibleScriptUrl = "https://something.com/..."
plausibleDomain = "example.com"
# enable analytics using Umami
umamiScriptUrl = "https://something.com/..."
umamiWebsiteId = "example-tracking-code"
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
tocBeforeImage = false # show the table of contents before the main article image; default false

View File

@ -0,0 +1,10 @@
{{ if .Site.Params.umamiScriptUrl }}
{{ if .Site.Params.umamiWebsiteId }}
<script
async
defer
data-website-id="{{ .Site.Params.umamiWebsiteId }}"
src="{{ .Site.Params.umamiScriptUrl }}"
></script>
{{ end }}
{{ end }}