Skip to content

Commit

Permalink
Add .IndividualTracking to public templates. Closes #1663.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jan 27, 2024
1 parent 74ef6f5 commit 6cb9982
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/init.go
Expand Up @@ -769,6 +769,7 @@ func initHTTPServer(app *App) *echo.Echo {
AssetVersion: app.constants.AssetVersion,
EnablePublicSubPage: app.constants.EnablePublicSubPage,
EnablePublicArchive: app.constants.EnablePublicArchive,
IndividualTracking: app.constants.Privacy.IndividualTracking,
}

// Initialize the static file server.
Expand Down
3 changes: 3 additions & 0 deletions cmd/public.go
Expand Up @@ -33,6 +33,7 @@ type tplRenderer struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
IndividualTracking bool
}

// tplData is the data container that is injected
Expand All @@ -45,6 +46,7 @@ type tplData struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
IndividualTracking bool
Data interface{}
L *i18n.I18n
}
Expand Down Expand Up @@ -99,6 +101,7 @@ func (t *tplRenderer) Render(w io.Writer, name string, data interface{}, c echo.
AssetVersion: t.AssetVersion,
EnablePublicSubPage: t.EnablePublicSubPage,
EnablePublicArchive: t.EnablePublicArchive,
IndividualTracking: t.IndividualTracking,
Data: data,
L: c.Get("app").(*App).i18n,
})
Expand Down

0 comments on commit 6cb9982

Please sign in to comment.