mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 06:14:22 +01:00
make "s" (Settings) a global template function so we don't have to pass it around everywhere.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user