proper setting for searching with `fuse`?
xarthurx opened this issue · 8 comments
New to docus
and realize that there're enough info for how to configure the search
functionality.
In the documentation, only one line mentioned useFuse
options, but I cannot find any example config files/settings in the app.config.ts
.
How to activate the search / deactivate it?
My website have the button, but nothing shows up if I type any keyword.
(fuse.js
is manually added to the dependencies)
I'm in the same boat. Search used to work but somehow it doesn't anymore (I'm on 1.14.6) as I'm getting the "No results found. Try another query" message
I also faced in this issue.
It was resolved by pinning @nuxt/content
version to 2.7.2
.
Hello, could someone provide a minimal reproduction, so that, I'll take a look?
Hello, could someone provide a minimal reproduction, so that, I'll take a look?
Even in the clean starter template search doesn't work.
Created one (with pnpm
), you can check it:
In fact, it does not work on the playground https://stackblitz.com/github/nuxt-themes/docus-docs-starter/tree/main/?file=content%2F1.guide%2F0.index.md
I would love to debug this an create a PR to solve this issue but I'm unable to start this project on WSL.
More than 20 seconds to start Vite and Nitro never start. 😅
The _empty
field in the parsed content is returning undefined
. Probably, something in nuxt content.
The easy fix is to check for it here like below and the search will work properly:
// _empty can return undefined, so we need to check for that
(doc?._empty === undefined || doc?._empty === false)
I experience exactly the same issue.
I have the documentation built using docus and the search does not work.
I am using Nuxt Content 2.8.2, docus 1.12.3.
The code can be checked here https://github.com/Baroshem/nuxt-security/tree/chore/1.0.0-rc.1