From d4d6698168ca1ac1e0e80b58145a7b3b86f018f2 Mon Sep 17 00:00:00 2001 From: Dejavu Moe Date: Fri, 16 Jun 2023 10:22:49 +0800 Subject: [PATCH] add plausible analytics --- config/_default/params.toml | 6 ++++++ layouts/partials/analytics.html | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index c79ad081..f76a41de 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -70,6 +70,12 @@ fingerprintAlgorithm = "sha256" # site = "ABC12345" # domain = "llama.yoursite.com" +[plausible] + enable = false + domain = "llama.yoursite.com" + event = "" + script = "" + [verification] # google = "" # bing = "" diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index f8c7c2c2..a4c3e8ac 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -6,5 +6,14 @@ {{ end }} {{ end }} + {{ if site.Params.plausible.enable }} + {{ with site.Params.plausible.domain }} + + {{ end }} + {{ end }} {{ template "_internal/google_analytics.html" . }} -{{ end }} +{{ end }} \ No newline at end of file