Replies: 2 comments 5 replies
-
|
If you want to display search results on some page (e.g. search.astro), take a look at pre-filled search results example. If you want to use Pagefind's Search API, you can import pagefind library and use it directly. This astro-pagefind doesn't improve on or hinder that use case. Otherwise, maybe share an example of a website, which behavior you are trying to replicate? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your reply. I'm basically trying to replicate a search engine like Google. Basic search form on one page, user enters their search query, user then gets directed to another page and is shown a list of results. I don't want to use the default Pagefind UI. Instead, I want to create my own UI. I've not yet been able to find an example of someone doing this that I can replicate. Is it possible to somehow utilise the pre-filled search results example to then pull out data (e.g. page title, url, image etc.) and then create a loop? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I just wanted to make sure that astro-pagefind supports the use of the API to make custom search UIs.
I'm still quite new to Astro and web development, meaning so far, I've not quite understood for the make us of the API in my project. Would it be possible to share a really simple example of how I could use the API to display search results on a separate page (e.g. search.astro) from a simple form?
Beta Was this translation helpful? Give feedback.
All reactions