diff --git a/routes.go b/routes.go index 2cab220..71eac7d 100644 --- a/routes.go +++ b/routes.go @@ -42,7 +42,9 @@ func setupRoutes(router *mux.Router, routes []Route) { } infos = route.Setup(infos, r) - route.Title = strings.Replace(route.Title, "", infos["id"].(string), 1) + if id, ok := infos["id"]; ok { + route.Title = strings.Replace(route.Title, "", id.(string), 1) + } templates.Render(rw, r, route.Template, &templates.Page{ Title: route.Title,