[Bug]: 配置了algolia search,搜索没有返回值,报错algolia.js:96 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value')
使用的 Butterfly 版本? | What version of Butterfly are you use?
4.4.2
使用的瀏覽器? || What browse are you using?
Chrome
使用的系統? || What operating system are you using?
macOS
問題描述 | Describe the bug
配置了algolia search,搜索没有返回值,报错algolia.js:96 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value')

但实际是有搜索结果的

出現問題網站 | Website
https://khalitt.github.io/
https://github.com/jerryc127/hexo-theme-butterfly/issues/923
#923
报错的行不一样,923是98行,这里是96行
你用的是哪个插件
algoliasearch
如 #923 所述,如果你使用的是这个插件,那么在使用稳定版的前提下,你需要配置好必须的参数,由你截图可知
path或者 permalink 似乎并未配置, content 也未配置,所以没有返回内容是报错正常的,当然报错确实是因为当时在处理这部分的时候没有考虑全面
另外,即使是最新 dev 版本,因为太久没用过 hexo-algolia 插件,也没看源码,不确定是否已经可以生成或自定义 content,所以仍然建议如果非必要全站搜索,只是搜索文章还是使用 hexo-algoliasearch 插件
另外tags参数如果你未修改js的话,不会返回具体匹配内容,对搜索结果呈现没有帮助,当然你也可以配置一下可搜索数据,使之可搜索,建议是删除此参数,以缩短响应时间
感谢回答,现在我用的就是hexo-algoliasearch这个插件,也尝试过把permalink等参数全部加进来,可搜索数据也把所有参数配上了,但是问题依旧

使用最新版看看还有没有问题
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.