From 624b0699ab9f6c018fafbef71c58edb4af3ce325 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 11 Apr 2023 11:05:15 +0200
Subject: [PATCH] plausible in params

---
 config.yaml                            | 1 +
 layouts/_default/baseof.html           | 1 +
 layouts/partials/footer/plausible.html | 3 +++
 3 files changed, 5 insertions(+)
 create mode 100644 layouts/partials/footer/plausible.html

diff --git a/config.yaml b/config.yaml
index 0f643310..41c2fbb9 100644
--- a/config.yaml
+++ b/config.yaml
@@ -6,6 +6,7 @@ params:
     page: https://gdpr.eu/cookies/
   breadcrumb:
     position: hero-start #  hero-start |  hero-end | after-hero
+  plausible: 
   posts:
     default_image: false
     index:
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8dd9d91d..a848f58a 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -22,6 +22,7 @@
     </main>
     {{- partial "footer/footer.html" . -}}
     {{- partial "footer/cookie-banner.html" . -}}
+    {{- partial "footer/plausible.html" . -}}
     {{- partial "footer/js.html" . -}}
     {{- partial "footer/script.html" . -}}
     {{- if not hugo.IsProduction -}}
diff --git a/layouts/partials/footer/plausible.html b/layouts/partials/footer/plausible.html
new file mode 100644
index 00000000..21363a43
--- /dev/null
+++ b/layouts/partials/footer/plausible.html
@@ -0,0 +1,3 @@
+{{ with site.Params.plausible }}
+<script defer data-domain="{{ . }}" src="https://plausible.io/js/script.js"></script>
+{{ end }}
\ No newline at end of file
-- 
GitLab