cmfcmf / docusaurus-search-local

Offline / Local Search for Docusaurus v2. Try it live at:
https://cmfcmf.github.io/OpenWeatherMap-PHP-API/
MIT License
437 stars 67 forks source link

how to enable search in localhost? #159

Closed sibelius closed 1 year ago

sibelius commented 1 year ago

:unicorn:

I've read all these

You can now use the search bar to search your documentation.

Important: Search only works for the statically built documentation (i.e., after you ran yarn build in your documentation folder).

Search does not work in development (i.e., when running yarn start). If you want to test search locally, first build the documentation with yarn build, and then serve it via yarn serve.

but how can I generate search index even locally?

Can I have a nodemon/watch command running in the background ?

cmfcmf commented 1 year ago

Unfortunately, the only way to have working search on locally is to build the documentation (docusaurus build) and then serve the documentation (docusaurus serve).