diff --git a/server.js b/server.js index b0aabac..46f3a81 100644 --- a/server.js +++ b/server.js @@ -431,10 +431,15 @@ app.get("/search", async (req, res) => { return res.redirect("/"); } + const summary = await wiki + .summary(query + "") + .then((summary_) => (summary_.title !== "Not found." ? summary_ : "none")); + renderTemplate(res, req, "search.ejs", { j, continuation, q: query, + summary }); });