koishijs / koishijs/docs

Bug:文档的搜索功能不可用

Open
#201 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
27
Forks
141
PR merge metrics
No merged PRs in 30d

Description

问题:按下 `Ctrl+K` 或直接点击搜索框时,页面变灰而搜索框并未出现。

系统版本:Windows 11 24H2(26100.4351)

尝试过的浏览器版本:

Microsoft Edge:137.0.3296.93(x64)

Google Chrome:137.0.7151.120 (x64)

复现(Microsoft Edge):

![Image](https://github.com/user-attachments/assets/e8ff0e01-67b9-406e-b4df-12635a2a475b)

Edge 浏览器控制台报错:
```
zh-CN/:1 Access to fetch at 'https://search.koishi.chat/indexes/koishi-docs/search' from origin 'https://koishi.chat' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
search.koishi.chat/indexes/koishi-docs/search:1


Failed to load resource: net::ERR_FAILED
theme.cqhn05DL.js:98 MeiliSearchCommunicationError: Failed to fetch
at y. (theme.cqhn05DL.js:97:650)
at A (theme.cqhn05DL.js:96:30371)
at Object.next (theme.cqhn05DL.js:96:29675)
at theme.cqhn05DL.js:96:29390
at new Promise ()
at __awaiter$1 (theme.cqhn05DL.js:96:29190)
at y.request (theme.cqhn05DL.js:97:317)
at y. (theme.cqhn05DL.js:97:1393)
at A (theme.cqhn05DL.js:96:30371)
at Object.next (theme.cqhn05DL.js:96:29675)
(匿名) @ theme.cqhn05DL.js:98
theme.cqhn05DL.js:98 Uncaught (in promise) Error: MeiliSearchCommunicationError: Failed to fetch
at Proxy. (theme.cqhn05DL.js:98:15336)
at A (theme.cqhn05DL.js:98:4071)
at Object.throw (theme.cqhn05DL.js:98:3354)
at A (theme.cqhn05DL.js:98:2978)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with Ctrl+K or the search box and inspect the preflight request to https://search.koishi.chat/indexes/koishi-docs/search alongside the failing theme.cqhn05DL.js call. Trace the documentation site's search integration and verify that the search dialog appears and queries complete without the reported CORS or MeiliSearchCommunicationError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, frontend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.