但是我在 algolia 可以搜索到
search: {
provider: 'algolia',
options: {
appId: 'PBT33QQIUI',
apiKey: 'f89129281b57349f1db1d2fa0fa652df',
indexName: 'netlify_e683bb75-c0ba-4f7a-8bda-72bc295403d0_main_all',
},
},
有什么错误么?
发现也有 log 啊,就是undefined
1
Alkaidcc 2023-07-03 09:11:45 +08:00
algolia 不行的话可以换 local search 试试,https://vitepress.dev/reference/default-theme-search#local-search
|
2
ourongxing 2023-07-03 10:20:40 +08:00
把 lang 这段加上去
```json "selectors": { "lvl0": "", "lvl1": ".content h1", "lvl2": ".content h2", "lvl3": ".content h3", "lvl4": ".content h4", "lvl5": ".content h5", "content": ".content p, .content li", "lang": { "selector": "/html/@lang", "type": "xpath", "global": true } }, ``` |
3
jjnox OP @ourongxing 写在何处?
|
4
ourongxing 2023-07-03 14:29:35 +08:00
@jjnox 爬虫配置文件啊,你这难道是 algolia 自动爬的。
|
5
jjnox OP @ourongxing 对啊,部署在 netlify ,有插件,自动爬的,就是前端无法显示啊,只出来`underfined`
|
6
jjnox OP @jjnox 现在用 docker 自己跑,
```bash docker run -it --rm --env-file=/share/Docker/algolia/.env.valorant -e "CONFIG=$(cat /share/Docker/algolia/valorant.json | jq -r tostring)" algolia/docsearch-scraper ``` 文档 vitepress 版本 ``` "vitepress": "1.0.0-beta.1" ``` valorant.json 配置该怎么写 |
7
jjnox OP @ourongxing ok 了
|