Files
docs/packages/core
zeekay b4a7572cf5 fix(docs): make search work on the static site (client-side flexsearch)
The search dialog used `type: 'hanzo'`, POSTing to a remote auth-gated API a
public static site can't call — every query silently returned empty. The
`/api/search` route also froze to the force-static empty-query `[]`.

- route: export `staticGET` (the whole flexsearch index) instead of the dynamic
  GET; tokenize `forward` (prefix / as-you-type) over titles + section headings
  only. A full-body forward index exceeds V8's max string length and OOMs the
  export; headings-only is ~20MB / 1.7MB gzipped.
- dialog: `type: 'flexsearch-static'` from /api/search — no server, no auth.
- core: wire the missing `flexsearch-static` case into useDocsSearch; re-export
  buildIndexDefault so the route can tag pages (All/Services/SDKs/API/Products).

Verified on the built out/api/search: agents 85, authentication 113, getting
started 40, prefix "deplo"->/docs/deploy; all five filters return results.
2026-07-24 23:21:05 -07:00
..
2026-03-28 18:00:45 +08:00
2026-05-29 19:49:33 +08:00
2025-11-11 21:30:17 +08:00

@hanzo/docs-core

The core library for Hanzo Docs.

📘 Learn More: Documentation