From 794065354abd3c74e6b87598a20b1cd9b66293bb Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Mon, 18 Mar 2024 12:33:50 +0800 Subject: [PATCH 1/2] add analyze icon in footer if "umami.shareUrl" is set. --- layouts/partials/footer.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f8b3f95..9f2ca6e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -14,8 +14,11 @@ {{ end }} -
+
© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }} + {{ if .Site.Params.UmamiAnalytics.shareUrl }} + + {{ end }}
{{ i18n "powered" }} Hugo, {{ i18n "theme" }} Anubis2.
From e8ddc45ef93da6a70fe8da53c4fb819c9e00714d Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Mon, 18 Mar 2024 12:46:45 +0800 Subject: [PATCH 2/2] add umami track --- exampleSiteMultilingual/hugo.toml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/exampleSiteMultilingual/hugo.toml b/exampleSiteMultilingual/hugo.toml index 6bc7cdd..682da65 100644 --- a/exampleSiteMultilingual/hugo.toml +++ b/exampleSiteMultilingual/hugo.toml @@ -6,7 +6,7 @@ theme = "anubis2" paginate = 3 disqusShortname = "" -googleAnalytics = "" + [author] name = "Junyi" @@ -141,3 +141,13 @@ author = "authors" [markup.goldmark.renderer] unsafe = true + + +[params.UmamiAnalytics] + enabled = true + dnt = false + id = "e4f661ff-9a8c-49d4-b3cc-2efe553e3973" # Website ID + datacache = false + url = "https://eu.umami.is/script.js" + shareUrl = "https://eu.umami.is/share/RIETUMwZn4IBMIr8/hugo-theme-anubis2.netlify.app" + \ No newline at end of file