Search results with Eleventy Edge #2344
Replies: 3 comments 3 replies
-
Edge won't do search for you, you would need to handle that yourself somehow, and it can also be done with Eleventy Serverless, regular ole Netlify Functions, or heck, client side. You've got a lot of options. Some examples: https://www.raymondcamden.com/2021/06/06/using-lunr-with-eleventy-via-netlify-serverless-functions-part-two |
Beta Was this translation helpful? Give feedback.
-
I've been trying out these solutions with client-side Lunr search on Eleventy 2.0.1. So far I have in my base layout (all the logs are there for debugging):
Now when I load my search page, I'd like to pass the search results to the
For which I am getting searchResults as I also looked at this issue but it seems I would need to render the template from within the script, and I'm not sure how to do this. |
Beta Was this translation helpful? Give feedback.
-
@p3palazzo did you evaluate Pagefind? Some resources: |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm looking to fetch search results via Eleventy Edge. So I will hit an endpoint, it will respond with some JSON, I will then loop through these and return HTML. Is this something Edge would be able to handle or am I barking up the wrong tree?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions