Open irangarcia opened 1 year ago
Yes, You might use libraries such as flexsearch
to add a search to your own theme, they have an official implementation in the docs theme
But it will be great if it's a built-in feature of Nextra core There's also a pull request about rewriting the search algorithm
we could export <Search />
and <Flexsearch
from nextra/components
and maybe rename Flexsearch to something other
Also we can write docs for the search index file format, so you can do anything with it :)
we could export
<Search />
and<Flexsearch
fromnextra/components
and maybe rename Flexsearch to something other
@B2o5T There is some part in the DOC where we can consult a list of components that can be exported. I notice that there are specific components in nextra-theme-docs and nextra/components (I'm a little confused by the differences), it would be interesting to have somewhere in the documentation some section on this point.
And, can the exported components be "customized" (Something similar to docusaurus swizzling)?
Thank you very much :)
nextra/components
contain components that are used in nextra-theme-docs
and nextra-theme-blog
, feel free to add it to docs
And, can the exported components be "customized" (Something similar to docusaurus swizzling)?
it depend from component, some are customizable like <Callout />
, some - not
And, can the exported components be "customized" (Something similar to docusaurus swizzling)?
it depend from component, some are customizable like
<Callout />
, some - not
It would be nice to see a list of customizable components, much like the output of docusaurus npm run swizzle -- --list
or in nextra's documentation.
we could export
<Search />
and<Flexsearch
fromnextra/components
and maybe rename Flexsearch to something other
I'm trying to add a big search bar to the middle of the homepage (using nextra-theme-docs) but as it's not exported currently it doesn't seem possible without either editing the theme or re-implementing search (which seems like a bad idea), so I'd really appreciate this as a feature.
Is it possible to use the Nextra search with a custom theme? It looks for me that the component is inside the nextra-theme-docs