askorama / orama

🌌 Fast, dependency-free, full-text and vector search engine with typo tolerance, filters, facets, stemming, and more. Works with any JavaScript runtime, browser, server, service!

Home Page:https://docs.orama.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin for Docusaurus not working + gets confusing on 2nd attempt of serve

tfulanchan opened this issue · comments

Describe the bug

I am deploying Orama for a Docusaurus application.

Before Orama is deployed, the "Usage" section used to display code for docusaurus.config.js and "Set the API key" only as shown in the Docs as of this moment.
useBeforeDeploy

Once Orama was deployed and a Docusaurus website is served locally, the "Usage" section changed completely:
"API endpoint" pops up on the top, "API Integration" appears and configurations for docusaurus.config.js disappeared.
usageAfterDeployed

The Console is showing the following errors when the project is built and served for another time.
oramaFailure

It seems I need an API endpoint after Orama is deployed but the documentation does not describe how to configure it for Docusaurus completely, not to mention the code blog displayed in the "Usage" section. Very confusing, the Docs needs to clarify the integration of Orama Cloud for Docusaurus specifically.

To Reproduce

  1. Initiate a Docusaurus project and install the Orama plugin
  2. Create an index as instructed in the documentation
  3. Add @orama/plugin-docusaurus-v3 to Docusaurus list of plugins in docusaurus.config.js
  4. Build the Docusaurus project and serve for the 1st time
  5. Stop the serve and serve for 2nd time

Expected behavior

I expect Orama plugin working fine in 2nd attempt but the Orama search component on the top is no longer responding in 2nd attempt of build and serve

Environment Info

OS: Windows 10
Node: >=18.0
Docusaurus: 3.2.1
@orama/plugin-docusaurus-v3: 2.0.16
@oramacloud/client: ^1.0.14

Affected areas

Search

Additional context

No response

Hi there, @raiindev is looking into that!

Hey @tfulanchan, we updated the docusaurus flow on the dashboard to make it clearer.
Let me know if it helps!