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

建议搜索结果以列表方式逐条显示,点击跳转后增加在页面内不同高亮关键词间切换的按钮 #16

Open
justin5267 opened this issue May 7, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@justin5267
Copy link

目前搜索结果都是集中以文本方式显示,不方便阅读和点击,建议命中结果以列表方式逐条显示。同时,点击某条命中结果虽可跳转至页面相应位置,但页面内无法快速切换到下一条命中结果,建议增加跳转至“下一个”高亮关键词的按钮。

移动状态下,希望支持自定义截取命中关键词前后上下文字数。

桌面状态下,希望支持在单独的侧边栏中展示搜索结果列表。

需求和建议有点多,实在不好意思哈

image
image

@Neutree Neutree added the enhancement New feature or request label May 7, 2022
@Neutree
Copy link
Member

Neutree commented May 15, 2022

给搜索结果加了上一个下一个按钮 44d4d62

image

image

@Neutree
Copy link
Member

Neutree commented May 15, 2022

至于右边侧边栏显示搜索结果,太复杂了, 个人觉得没有做的必要

@justin5267
Copy link
Author

justin5267 commented May 15, 2022

太牛了,这样方便多了!逐条显示的问题我自己解决了,show_length改为50,并在...后面加了<p></p>,作为一名没有编程基础的外行,只能摸索到这个程度了。
image

@justin5267
Copy link
Author

刚升级了最新版本,没有看到新增加的按钮,官网搜索也没看到,是需要设置么
image

@justin5267
Copy link
Author

至于右边侧边栏显示搜索结果,太复杂了, 个人觉得没有做的必要

同意你的观点,确实没必要,另外有以下几个改进建议供参考:

1、目前搜索结果中点击命中结果后,会直接在当前页打开,导致跳转后无法返回继续查看搜索列表,建议可设置桌面端默认在新标签页中打开。

2、假设show_length为3,在正文<p>1234567890</p><p>ABCDEFG</p>中搜索890时,目前截取显示的字符串为“...567890ABC...”,不知制作index的时候,可否保留<p></p>标记,并利用段落标记提高截取上下文的相关性,即显示为567890(发现段落标记时直接截断)或234567890(发现段落标记时向相反方向延长)。

3、teedoc官网搜索时,部分文档会形成一组group,不知道这个是如何实现的,我搜索的时候,有多少个文件,就在左边列了多少个标签。

image

@justin5267
Copy link
Author

justin5267 commented May 17, 2022

问题3自己解决了,多个md文件放在一个文档目录下,route指向这个文件夹就可以实现,我之前给每个md文件单独建了个文件夹.,还配置了route..

@justin5267
Copy link
Author

刚升级了最新版本,没有看到新增加的按钮,官网搜索也没看到,是需要设置么 image

这个插件更新到新版就可以了

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

No branches or pull requests

2 participants