From 6cb9982aacc1f5f4bfb46b39caba91ed0a537acf Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sat, 27 Jan 2024 22:38:26 +0530 Subject: [PATCH] Add `.IndividualTracking` to public templates. Closes #1663. --- cmd/init.go | 1 + cmd/public.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/cmd/init.go b/cmd/init.go index 03c9f475..bda3c4ec 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -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. diff --git a/cmd/public.go b/cmd/public.go index cb2ddd32..cb970e32 100644 --- a/cmd/public.go +++ b/cmd/public.go @@ -33,6 +33,7 @@ type tplRenderer struct { AssetVersion string EnablePublicSubPage bool EnablePublicArchive bool + IndividualTracking bool } // tplData is the data container that is injected @@ -45,6 +46,7 @@ type tplData struct { AssetVersion string EnablePublicSubPage bool EnablePublicArchive bool + IndividualTracking bool Data interface{} L *i18n.I18n } @@ -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, })