1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-12-30 05:21:55 +00:00

Add optional Umami tracking
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Tixie Salander 2024-04-24 20:45:04 +02:00
parent 2707ebb45a
commit 68c0e8f0f9
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -17,7 +17,7 @@ disableKinds = ["taxonomy"]
quality = 95
[security]
[security.funcs]
getenv = [ "^HUGO_", "CONTEXT", "URL", "BASE_URL" ]
getenv = [ "^HUGO_", "CONTEXT", "URL", "BASE_URL", "UMAMI_DOMAIN", "UMAMI_ID" ]
## Deploy into a Garage bucket at Deuxfleurs
[[deployment.targets]]

View file

@ -13,6 +13,12 @@
<base href="{{ if getenv "CONTEXT" }}{{ cond (eq "production" (getenv "CONTEXT")) (getenv "URL") (getenv "DEPLOY_PRIME_URL") }}{{ else }}{{ $.Site.BaseURL }}{{ end }}">
<link rel="canonical" href="{{ .Permalink }}">
{{ if (and (getenv "UMAMI_DOMAIN") (getenv "UMAMI_ID")) }}
<script defer src="https://{{ getenv "UMAMI_DOMAIN" }}/script.js" data-website-id="{{ getenv "UMAMI_ID" }}"></script>
{{ end }}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/favicons/apple-touch-icon.png" | absURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/favicons/favicon-32x32.png" | absURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/favicons/favicon-16x16.png" | absURL }}">