typesense / docusaurus-theme-search-typesense

A fork of the awesome @docusaurus/theme-search-algolia library customized to work with Typesense
https://typesense.org/docs/guide/docsearch.html
MIT License
67 stars 15 forks source link

Placement of search box #34

Closed arvinddoraiswamy closed 1 year ago

arvinddoraiswamy commented 1 year ago

Hi :) So I followed the instructions on https://typesense.org/docs/guide/docsearch.html#option-a-docusaurus-powered-sites and have the search box in the top right of the page. It seems to work OK in that I get some results back (I'll tune later) - but I was curious if there was a way to change the position of the search box from the top right to the center of the page easily.

If not, what will I have to change in the code to change the position of the box. Could you help out with this?

Thanks Arvind

jasonbosco commented 1 year ago

I think this might be a question for the the docusaurus team, because the location of the search bar is not managed within this theme from what I can tell. I essentially forked the Algolia theme and made it work with Typesense, and I don't recall seeing any page layout settings in the process.

arvinddoraiswamy commented 1 year ago

Ah okay - i'll go poke there. How does it magically end up in the top right though then - was what I was wondering. Like if there's another theme tomorrow - would that end up top right as well, or can there only ever be a single theme in docusaurus?

jasonbosco commented 1 year ago

How does it magically end up in the top right though then - was what I was wondering

I think the base docusaurus theme has a placeholder on the top right for the search bar, and if there are any search related themes, it uses them to render that portion of the navbar.

arvinddoraiswamy commented 1 year ago

Thanks. Do you think it might be possible to change it around with either:

image

but that apart - i'll go poke docasaurus folks :) - I don't know much react at all, just trying to use a theme and hence some questions.