Improve serach function with quick suggestions
This commit is contained in:
@@ -98,6 +98,7 @@ func main() {
|
||||
}))
|
||||
http.HandleFunc("/_logout", h.handleLogout)
|
||||
http.HandleFunc("/_reindex", h.handleReindex)
|
||||
http.HandleFunc("/_search", h.handleSearchSuggest)
|
||||
http.HandleFunc("/quickadd", h.handleQuickAdd)
|
||||
http.Handle("/", h)
|
||||
|
||||
@@ -284,9 +285,13 @@ func (h *handler) serveDir(w http.ResponseWriter, r *http.Request, urlPath, fsPa
|
||||
rawContent = "# " + heading + "\n\n"
|
||||
}
|
||||
|
||||
parent := ""
|
||||
if urlPath != "/" {
|
||||
parent = parentURL(urlPath)
|
||||
}
|
||||
data := pageData{
|
||||
Title: title,
|
||||
Crumbs: buildCrumbs(urlPath),
|
||||
ParentURL: parent,
|
||||
CanEdit: true,
|
||||
EditMode: editMode,
|
||||
IsRoot: urlPath == "/",
|
||||
|
||||
Reference in New Issue
Block a user