From 25cf285710be27cf64b80a02353eeaf58c817a39 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Fri, 16 Oct 2020 20:02:18 +0200 Subject: [PATCH] added support for plausible analytics --- README.md | 4 ++++ layouts/_default/baseof.html | 1 + layouts/partials/plausible.html | 10 ++++++++++ 3 files changed, 15 insertions(+) create mode 100644 layouts/partials/plausible.html diff --git a/README.md b/README.md index 409ed08..dd0e031 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,10 @@ paginate = 5 # number of articles per page in the index # enable comments support with commento using the script from your server commento = "https://example.com/js/commento.js" + # enable analytics using Plausible + plausibleScriptUrl = "https://something.com/..." + plausibleDomain = "gabmus.org" + # the links array shows links with icons (if explicitly supported) # it's an array of arrays containing two strings: name and link # the supported icons are: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ec32095..103f322 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,5 +9,6 @@ {{- partial "footer.html" . -}} + {{- partial "plausible.html" . -}} diff --git a/layouts/partials/plausible.html b/layouts/partials/plausible.html new file mode 100644 index 0000000..a16fcfc --- /dev/null +++ b/layouts/partials/plausible.html @@ -0,0 +1,10 @@ +{{ if .Site.Params.plausibleScriptUrl }} + {{ if .Site.Params.plausibleDomain }} + + {{ end }} +{{ end }}