From e984e2b0fb3d44bf6efd89c99c512d2b3527c81c Mon Sep 17 00:00:00 2001 From: Olof Nord Date: Wed, 6 Apr 2022 16:38:38 +0200 Subject: [PATCH 1/2] Add umami analytics support --- README.md | 4 ++++ layouts/partials/umami.html | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 layouts/partials/umami.html diff --git a/README.md b/README.md index c78b616..2a5ac0b 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ summaryLength = 70 # number of words for article summaries plausibleScriptUrl = "https://something.com/..." plausibleDomain = "example.com" + # enable analytics using Umami + umamiScriptUrl = "https://something.com/..." + umamiWebsiteId = "example-tracking-code" + enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse tocBeforeImage = false # show the table of contents before the main article image; default false diff --git a/layouts/partials/umami.html b/layouts/partials/umami.html new file mode 100644 index 0000000..2890627 --- /dev/null +++ b/layouts/partials/umami.html @@ -0,0 +1,10 @@ +{{ if .Site.Params.umamiScriptUrl }} + {{ if .Site.Params.umamiWebsiteId }} + + {{ end }} +{{ end }} From b954c41eef943c58bc8bd974c95f91b2c9c0d7bc Mon Sep 17 00:00:00 2001 From: Olof Nord Date: Wed, 6 Apr 2022 16:44:42 +0200 Subject: [PATCH 2/2] Adjust base as to include new partial as well --- layouts/_default/baseof.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ec073c1..5d2b506 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,6 +14,7 @@ {{- partial "plausible.html" . -}} + {{- partial "umami.html" . -}} {{- partial "inject/body.html" . -}}