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:
parent
bb0b97820b
commit
805e7ffdc2
6 changed files with 18 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue