使用FlexSearch.js搜索实现
我正在通过克隆我最喜欢的网站来学习雨果。
我正在尝试使用FlexSearch.js引擎实现搜索功能。 搜索引擎在其搜索页面上非常有效:
http:// localhost:1313/search/,
但是当我尝试从navbar box input表单搜索或在主页上使用搜索表格时,脚本将打开搜索页面,但没有搜索。
作为JavaScript的初学者,我确定脚本实现中的错误是在/assets/js/search.js,
我知道这不是雨果的问题,但是您能告诉我一个可能的解决方案吗?
这是一个项目的回购 https://github.com/antedoro/arberia.git
I am studying hugo by cloning my favorite site.
I’m trying to implement a search function using flexsearch.js engine.
The search engine works very well on its search page:
http://localhost:1313/search/
But when I try to search from navbar box input form or using the search form on the home page, the script opens the search page but without a search.
As a beginner on javascript I am sure there is an error in the script implementation at /assets/js/search.js
I know it’s not Hugo’s problem but can you tell me a possible solution to follow?
This is a project’s repo
https://github.com/antedoro/Arberia.git
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该主题是专用的JavaScript代码,该代码检测到在搜索页面的搜索框中输入的文本,并显示匹配结果。它位于。
顶部栏中的搜索框没有此JavaScript代码,因此当您开始在此搜索框中键入文本时,什么也不会发生。
The theme as a dedicated JavaScript code, which detects text being entered in the search box of the search page, and displays matching results. It is located at the end of this file.
The search box that is in the top bar does not have this JavaScript code, so nothing happens when you start to type text in this search box.