-
I was wondering whether it's possible to use the search component on a custom page? In my case, I have a custom splash page which doesn't use the StarlightPage base component (because I want to get rid of the default header and hero section design). But I'd still like to include the site search if possible. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That’s not currently supported very easily because the search component relies on some values it expects to receive as props that it’s probably a bit tricky to recreate manually. We’re hoping to refactor some stuff to move those to If you’re really keen, you could try importing |
Beta Was this translation helpful? Give feedback.
That’s not currently supported very easily because the search component relies on some values it expects to receive as props that it’s probably a bit tricky to recreate manually. We’re hoping to refactor some stuff to move those to
Astro.locals
instead ofAstro.props
which I think would unblock use cases like this.If you’re really keen, you could try importing
@astrojs/starlight/components/Search.astro
and play until it is receiving all the required props, but it might not be the most fun experience 😁