Skip to content

Commit 132032b

Browse files
committed
Remove unused Plausible Analytics code
1 parent b06b7d5 commit 132032b

5 files changed

Lines changed: 11 additions & 22 deletions

File tree

backend/config/config.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ const (
1313
)
1414

1515
type Config struct {
16-
DatabaseURI string `toml:"database_uri"`
17-
SecretKey string `toml:"secret_key"`
18-
Port string `toml:"port"`
19-
GithubClientID string `toml:"github_client_id"`
20-
GithubClientSecret string `toml:"github_client_secret"`
21-
GithubRedirectURI string `toml:"github_redirect_uri"`
22-
GoogleClientID string `toml:"google_client_id"`
23-
GoogleClientSecret string `toml:"google_client_secret"`
24-
GoogleRedirectURI string `toml:"google_redirect_uri"`
25-
PlausibleDataDomain string `toml:"plausible_data_domain"`
26-
GoatCounterCode string `toml:"goatcounter_code"`
16+
DatabaseURI string `toml:"database_uri"`
17+
SecretKey string `toml:"secret_key"`
18+
Port string `toml:"port"`
19+
GithubClientID string `toml:"github_client_id"`
20+
GithubClientSecret string `toml:"github_client_secret"`
21+
GithubRedirectURI string `toml:"github_redirect_uri"`
22+
GoogleClientID string `toml:"google_client_id"`
23+
GoogleClientSecret string `toml:"google_client_secret"`
24+
GoogleRedirectURI string `toml:"google_redirect_uri"`
25+
GoatCounterCode string `toml:"goatcounter_code"`
2726
}
2827

2928
func Read(data string) (Config, error) {

backend/web/layout/base.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ type BaseData struct {
1414
CSRFToken string
1515
Toast string
1616

17-
GoatCounterCode string
18-
PlausibleDataDomain string
17+
GoatCounterCode string
1918
}

backend/web/layout/base.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
<link rel="stylesheet" href="/css/fonts.css" />
1313
<link rel="stylesheet" href="/css/style.css" />
1414
<script src="/js/htmx.min.js" defer></script>
15-
{{with .PlausibleDataDomain}}
16-
<script src="https://plausible.io/js/script.js" data-domain="{{.}}" defer></script>
17-
{{end}}
1815
{{with .GoatCounterCode}}
1916
<script data-goatcounter="https://{{.}}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
2017
{{end}}

backend/web/util/template.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ func GetTemplateBaseData(r *http.Request, w http.ResponseWriter) layout.BaseData
3030
}
3131

3232
conf, ok := GetContextConfig(r)
33-
if ok && conf.PlausibleDataDomain != "" {
34-
data.PlausibleDataDomain = conf.PlausibleDataDomain
35-
}
3633
if ok && conf.GoatCounterCode != "" {
3734
data.GoatCounterCode = conf.GoatCounterCode
3835
}

bloggulus.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,5 @@ port = "5000"
2525
# OPTIONAL - Google OAuth redirect URI
2626
# google_redirect_uri = ""
2727

28-
# OPTIONAL - Plausible Analytics data domain
29-
# plausible_data_domain = ""
30-
3128
# OPTIONAL - GoatCounter code
3229
# goatcounter_code = ""

0 commit comments

Comments
 (0)