From 344dc4719b9c5b49ca3f88cf9173504c980bcb10 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Fri, 21 Aug 2026 13:23:58 -0400 Subject: [PATCH] Add Plausible Analytics tracking Wires the site up to the newly-deployed self-hosted Plausible instance at plausible.reground.org, gated behind hugo.IsProduction so local dev builds never send events. --- hugo.toml | 1 + layouts/_default/baseof.html | 1 + layouts/partials/head-analytics.html | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 layouts/partials/head-analytics.html diff --git a/hugo.toml b/hugo.toml index 2b22722..56220aa 100644 --- a/hugo.toml +++ b/hugo.toml @@ -13,6 +13,7 @@ disableKinds = ["taxonomy", "term"] description = "DevOps consulting, ghostwriting, and helping fiction authors find their right readers" author = "Will Estes" eec_base_url = "https://eec.reground.org" + plausible_domain = "reground.org" # [[menu.main]] # name = "Courses" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 32afb2c..574fc65 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -15,6 +15,7 @@ {{ else }} {{ end }} + {{ partial "head-analytics.html" . }} diff --git a/layouts/partials/head-analytics.html b/layouts/partials/head-analytics.html new file mode 100644 index 0000000..9da3dc4 --- /dev/null +++ b/layouts/partials/head-analytics.html @@ -0,0 +1,5 @@ +{{ if hugo.IsProduction }} +{{ with .Site.Params.plausible_domain }} + +{{ end }} +{{ end }}