Add Cloudflare Worker JSON API for search #191
Annotations
1 error
|
commitlint
You have commit messages with errors
⧗ input: Add Cloudflare Worker JSON API for search
Implements a lightweight Cloudflare Worker that provides a JSON API
endpoint for searching Docusaurus documentation using pre-built Lunr
indexes stored in Cloudflare KV.
Features:
- POST/GET /search endpoint for executing searches
- GET /indexes endpoint to list available indexes
- KV storage for search indexes with in-memory caching
- CORS support (configurable)
- Multi-version/tag support
- Complete TypeScript implementation
Includes:
- Worker implementation (src/worker.ts)
- Lunr.js ES module bundle (src/lunr-bundle.js)
- Index upload script (scripts/upload-indexes.js)
- Wrangler configuration for deployment
- Comprehensive documentation (README, DEPLOYMENT, examples)
This enables serving search results from Cloudflare's edge network
instead of loading indexes in the browser, reducing client bundle
size and providing consistent fast performance globally.
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/cmfcmf/docusaurus-search-local/blob/main/CONTRIBUTING.md#commit-message-guidelines
|