CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.22k stars 97 forks source link

How do I get pagefind to work with the nextjs app router? #611

Closed ytsmash closed 2 months ago

ytsmash commented 2 months ago

My website is SSG with nextjs app router. I checked the documentation and could only find the followind for pages router.

https://www.petemillspaugh.com/nextjs-search-with-pagefind

Please tell me how to introduce Pagefind into the app router

version

nextjs: 14.2.3 nodejs: 18.17.1

bglw commented 2 months ago

Hi @ytsmash 👋

I don't have personal experience with Next.js and Pagefind, so I'll only be able to point you toward others that have written up their solutions for this.

Sorry to not have anything specific for the app router, not something I have used personally. Hopefully someone out there who has used Pagefind and Next's app router can chime in and help out.

I'll convert this over to a discussion so it can stick around longer.