You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I just migrated one of my projects from Nextra 3 to Nextra 4, and now pagefind is used for search functionalities. From the website's perspective, everything works well, but I need to create an API, for example:
import{typeNextRequest}from'next/server';exportasyncfunctionGET(request: NextRequest){constsearchParams=request.nextUrl.searchParams;constquery=searchParams.get('query');// query is "hello" for /api/search?query=helloreturnnewResponse(`Hello, ${query}!`,{headers: {'content-type': 'text/plain'},});}
How can I use pagefind here? It's not mentioned in the official documentation for use with Next.js...
The text was updated successfully, but these errors were encountered:
Hello,
I just migrated one of my projects from Nextra 3 to Nextra 4, and now
pagefind
is used for search functionalities. From the website's perspective, everything works well, but I need to create an API, for example:How can I use
pagefind
here? It's not mentioned in the official documentation for use with Next.js...The text was updated successfully, but these errors were encountered: