diff --git a/README.md b/README.md index 8cbe4b81f..d951719b3 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ A [Hugo](https://gohugo.io/) theme for a personal portfolio with minimalist desi - counter.dev - Google Analytics - Matomo/Piwik + - [Umami](https://umami.is/) - Comment Support - [Disqus](https://disqus.com/) - [Valine](https://valine.js.org/) diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index e604c33ab..88b75b825 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -174,6 +174,11 @@ params: # matomo: # instance: matomo.example.com # siteId: 1 # Or any other number + # # Umami + # umami: + # scheme: https + # instance: umami.example.com + # id: # Enable Support support: diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 2026f01b6..a619231e4 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -2,55 +2,61 @@ {{ with site.Params.features.analytics }} {{ if or .enable .enabled }} {{ with .services }} - - {{ with .google }} - {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }} - {{ $analyticsConfig := dict (slice "Site" "Config" "Services" "GoogleAnalytics" "ID") .id }} - {{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }} - {{ end }} + + {{ with .google }} + {{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }} + {{ $analyticsConfig := dict (slice "Site" "Config" "Services" "GoogleAnalytics" "ID") .id }} + {{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }} + {{ end }} - - {{ with .counterDev }} - - {{ end }} + + {{ with .counterDev }} + + {{ end }} - - {{ with .goatCounter }} - {{ with .code }} - - {{ else }} - - {{ end }} - {{ end }} + + {{ with .goatCounter }} + {{ with .code }} + + {{ else }} + + {{ end }} + {{ end }} - - {{ with .matomo }} - - - {{ end }} + + {{ with .matomo }} + + + {{ end }} - {{ with .cloudflare }} - - - - {{ end }} + {{ with .cloudflare }} + + + + {{ end }} + + {{ with .umami }} + + + + {{end}} {{ end }} {{ end }} {{ end }}