From 68c0e8f0f98307d1a79b3275b5e84ea84e71388d Mon Sep 17 00:00:00 2001 From: Tixie Date: Wed, 24 Apr 2024 20:45:04 +0200 Subject: [PATCH] Add optional Umami tracking --- config.toml | 2 +- layouts/_default/baseof.html | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 717ff1e..b4542c0 100644 --- a/config.toml +++ b/config.toml @@ -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]] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index dbb7e12..b5928b0 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,6 +13,12 @@ + + {{ if (and (getenv "UMAMI_DOMAIN") (getenv "UMAMI_ID")) }} + + {{ end }} + +