make "s" (Settings) a global template function so we don't have to pass it around everywhere.

This commit is contained in:
fiatjaf
2023-10-07 08:20:10 -03:00
parent f169c01e67
commit 637cfa55e9
11 changed files with 18 additions and 23 deletions

View File

@@ -8,9 +8,7 @@ func renderRobots(w http.ResponseWriter, r *http.Request) {
typ := "robots"
w.Header().Set("Cache-Control", "max-age=3600")
params := map[string]any{
"s": s,
}
params := map[string]any{}
if err := tmpl.ExecuteTemplate(w, templateMapping[typ], params); err != nil {
log.Error().Err(err).Msg("error rendering")