feat: add source_url config option for footer source link

Thread source_url through: config.ServerConfig → Handler.sourceURL
→ PageData.SourceURL → template footer. Footer only shows Source
link when source_url is set.
This commit is contained in:
Franz Kafka 2026-03-22 08:34:20 +00:00
parent bb0b97820b
commit 805e7ffdc2
6 changed files with 18 additions and 9 deletions

View file

@ -77,7 +77,7 @@ func main() {
acSvc := autocomplete.NewService(cfg.Upstream.URL, cfg.HTTPTimeout())
h := httpapi.NewHandler(svc, acSvc.Suggestions)
h := httpapi.NewHandler(svc, acSvc.Suggestions, cfg.Server.SourceURL)
mux := http.NewServeMux()
mux.HandleFunc("/", h.Index)