Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki标签下的某个文章名字在搜索栏无法搜索到,求助该问题是否为bug #194

Open
oceanii opened this issue Feb 4, 2025 · 3 comments

Comments

@oceanii
Copy link

oceanii commented Feb 4, 2025

在使用fork仓库之后,并且代码已经手动同步到了最新。
在wiki页中的搜索栏搜索【Git】时,无法搜索到【Git常用命令】这边文章,搜索栏显示没有找到,如下截图所示。其他文章都是可以搜索到的,我对网页端这块不太熟悉,请大佬抽空帮忙看下是什么原因,谢谢!
地址:https://oceanii.github.io/wiki/

Image

@mzlogin
Copy link
Owner

mzlogin commented Feb 5, 2025

我看了下,应该是因为除了博客名称,URL 也会被用于搜索,而由于博客的根域名为 xxx.github.io,所以 Git 作为搜索关键字总是会被命中。

验证方法是搜索「常用命令」,实际是可以搜索到该结果的。

想要规避的话,可以参考 https://github.com/christian-fei/Simple-Jekyll-Search 修改一下搜索框的配置,在本模板里代码位置是 _includes/sidebar-search.html。

@oceanii
Copy link
Author

oceanii commented Feb 12, 2025

请问下是因为根域名包含git,所以在搜索时输入的git被过滤掉了,导致匹配不上对应的文章吗?

@mzlogin
Copy link
Owner

mzlogin commented Feb 13, 2025

请问下是因为根域名包含git,所以在搜索时输入的git被过滤掉了,导致匹配不上对应的文章吗?

嗯,没有被过滤掉,是从域名里匹配到 git 的结果太多了……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants