feat: add umami analytics
All checks were successful
Build and deploy website / Build and Push Hugo Site (push) Successful in 48s

This commit is contained in:
Radu C. Martin 2025-04-08 10:39:27 +02:00
parent 21dcebdc33
commit c8371d2890
5 changed files with 16 additions and 1 deletions

View file

@ -1,2 +1,4 @@
[[imports]]
path = "github.com/CaiJimmy/hugo-theme-stack/v3"
[[imports]]
path = 'github.com/hugomods/umami-analytics'

View file

@ -83,3 +83,8 @@ provider = "cactus"
defaultHomeserverUrl = "https://matrix.cactus.chat:8448"
serverName = "cactus.chat"
siteName = ""
[services]
[services.umami_analytics]
id = 'bce05e76-5cae-4688-a389-99bb87649d44'
script_url = 'https://umami.martin.md/script.js'

5
go.mod
View file

@ -2,4 +2,7 @@ module github.com/CaiJimmy/hugo-theme-stack-starter
go 1.17
require github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 // indirect
require (
github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 // indirect
github.com/hugomods/umami-analytics v0.3.1 // indirect
)

2
go.sum
View file

@ -1,2 +1,4 @@
github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0 h1:uITC7EKGyfPjyi3C5At++E0Uu1qQXtqiwMV4pd7LkLs=
github.com/CaiJimmy/hugo-theme-stack/v3 v3.30.0/go.mod h1:IPmCXiIxlFSLFYS0tOmYP6ySLviyeNVSabyvSuaxD+I=
github.com/hugomods/umami-analytics v0.3.1 h1:C4B1oKRBvCRamH3muiWK+QNbehmxd+7DiK80jHCdMJo=
github.com/hugomods/umami-analytics v0.3.1/go.mod h1:nlZGLPH5L+H25+HwmuzHsEfM869+tMTUTcSUBcOQEm4=

View file

@ -0,0 +1,3 @@
{{ if hugo.IsProduction }}
{{ partialCached "hugomods/umami-analytics/index" . .Params.analyze }}
{{ end }}