Searchbar is not working
I have cloned the Doc Template shared in Github and I have noticed that it is not working. When I write to search for something the application does not show anything other than the first page (Introduction, etc...) However, in the demo version deployed in Vercel it does work. Can someone help me solve this problem?
The search function searches only if all the pages are compiled, which is not the case when you're running the development server, and explains why it works on Vercel.
If you build your application locally and boot it with npm run start rather than npm run dev, you'll see it working locally too.
The search function searches only if all the pages are compiled, which is not the case when you're running the development server, and explains why it works on Vercel.
If you build your application locally and boot it with
npm run startrather thannpm run dev, you'll see it working locally too.
Did not work for me.
I have around 80 pages, specific documentation with different methods.
Search finds some previously created pages, but does not see new ones.
Yet I see SSG works fine and I've HTML/JS chunks in .next/server/pages folder.
It seems that for some reason no data being passed into chunks/nextra-data-en-US.json` for new pages. Any idea why that could happen? Pages on SSG are fully populated with content.
Did not work for me. I have around 80 pages, specific documentation with different methods. Search finds some previously created pages, but does not see new ones. Yet I see SSG works fine and I've HTML/JS chunks in
.next/server/pagesfolder.
One thing you could consider trying is removing the node_modules & .next folders and re-run npm i before building and starting. Might be something related to cache. I have automated this process by creating a pre-build script (TS + esno).
Did not work for me. I have around 80 pages, specific documentation with different methods. Search finds some previously created pages, but does not see new ones. Yet I see SSG works fine and I've HTML/JS chunks in
.next/server/pagesfolder.One thing you could consider trying is removing the
node_modules&.nextfolders and re-runnpm ibefore building and starting. Might be something related to cache. I have automated this process by creating a pre-build script (TS +esno).
Looks like pure on-page Markdown content is being parsed and okay for search and nextra-data.
However I have .tsx components rendered on the whole page, and they seem to be omitted by search/nextra data json.
Any known way to make React components content on MDX page also be searchable?