🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

How to Implement Site Search with Next.js

8 replies
Last updated: Jul 16, 2022
How are y'all implementing site search so that ppl can search for articles with Nextjs
Jul 16, 2022, 7:54 PM
With which framework?
Jul 16, 2022, 7:58 PM
Jul 16, 2022, 8:12 PM
Then you would typically have an API route that does the search. And you would query that endpoint in your frontend.
Jul 16, 2022, 8:16 PM
I saw there's an algolia search plugin, I wonder if that's worth a try
Jul 16, 2022, 8:19 PM
Oooh, I guess it depends how complex your data is and how critical the search feature is. Algolia is pretty complicated.
Jul 16, 2022, 8:22 PM
Meh not that complicated, I just need the title, image and slug returned so they can search and click on it
Jul 16, 2022, 8:25 PM
I mean on the frontend yes. But the Algolia setup is not trivial imo. I personally found it very overwhelming.
Jul 16, 2022, 8:28 PM
Oh I meant in terms of the data being critical and the search feature isn't super critical
Jul 16, 2022, 8:30 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?