Conversation
Docusaurus is so user friendly that you don't need to be a front end developer to use it. I couldn't figure out for the longest time why I kept getting error codes when I tried to test the search bar!
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Search definitively works locally, but it queries a remote Algolia index that needs to be "filled" with content that is usually crawled from your production website. Algolia can't crawl your localhost site (at least not easily, you'd need to install their crawler) so you need to first deploy your site, then ask Algolia to crawl it, then it will work in both productions and locally. We already have a warning explaining that: If it didn't work for you locally, then your index was likely empty, which can be seen on the Algolia dashboard. If your Algolia index has been created, and it only works in production but not locally, then we'd need a reproduction to investigate why. |
|
Thanks, I think I've figured out my challenge with you get an empty index if you BUILD it locally. If you just RUN it locally you get an error message IF YOU HAVEN'T built the site with the indexer in place. I was getting this error message when I added the search bar and was trying to run: × Once I built the site once, this issue went away. Run works fine for previewing the site now. So indeed I did conflate two issues together. My issue of the search bar not working with run if you've not built it might be a bit of an edge case. |

Docusaurus is so user friendly that you don't need to be a front end developer to use it. I couldn't figure out for the longest time why I kept getting error codes when I tried to test the search bar!
Pre-flight checklist
Motivation
It might seem obvious to some folks, but I stalled for a few weeks trying to figure out why my search bar wasn't working and it was all down to the difference between yarn start and yarn build.
Test Plan
The .md preview looks solid
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs