[bug] Search in docs do not work
Describe the bug Search in docs do not work
To reproduce
- Go to the docs page: https://heggria.github.io/taskflow/en/docs
- Click search (or CMD + K for macos)
- Type something that must show up, like
floworphase - Results should show up, but they don't
- Observe browser console (See attachments, there are 404 error messages)
Expected behavior Results shown after search
Observed behavior
- No results shown after search
- No errors
Environment
- OS: macOS
- Browser: Chrome
Screenshots
Fixed in rc/0.3.0-beta.2 (commit 7ab9818 fix(website): wire static search index for docs).
Root cause: Fumadocs 16's default search client fetches /api/search, which was not emitted on the static GitHub Pages export — every Cmd+K query 404'd and returned no results.
Fix:
- Added
website/app/api/search/route.tsusingcreateFromSource+staticGETso the full zbsearch index is pre-rendered into the static export. - Configured
RootProviderwithtype: 'static'and a basePath-aware API URL so the dialog loads the exported index.
Verified: pnpm build emits dist/api/search (advanced, i18n, 10358 docs); smoke search returns hits for flow/phase/budget/recompute in both en and zh-cn. Full suite 2357 pass / 0 fail.
This fix currently lives on rc/0.3.0-beta.2 and will ship with the 0.3.0-beta release. If you need it on the live docs sooner, it can be cherry-picked to main as a standalone patch.