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

[Feat]: 胡桃网站搜索时增加搜索框宽度并显示详情 #119

Open
Mikachu2333 opened this issue Mar 15, 2024 · 5 comments
Open
Assignees

Comments

@Mikachu2333
Copy link
Contributor

背景与动机

e4d0e59681f1cf4d048459835b495771

如图所示,倒一和倒二显示的内容完全一致,但实际指向的链接是不同的,希望增加搜索框宽度以显示详情的小标题

想要实现或优化的功能

优化网站的搜索功能,显示详细小标题

@Lightczx Lightczx transferred this issue from DGP-Studio/Snap.Hutao Mar 15, 2024
@Lightczx Lightczx removed their assignment Mar 19, 2024
@BTMuli
Copy link
Member

BTMuli commented Mar 19, 2024

希望增加搜索框宽度以显示详情的小标题

事实上,增加宽度也不会把省略的内容给显示全,搜索结果的展现依赖于插件 docsearch 的实现,

而 docsreach 对于搜索结果组件直接继承的 algolia 的 @docsearch/react

然后翻看后者源码,拿的数据是 _snippetResult.content.value 而非上级的 content,其内容就是你审查元素的那个带 <mark> 的,没有省略

所以这个超出了文档站的范围,建议去 上游 提 issue 反馈

@Mikachu2333
Copy link
Contributor Author

这个超出了文档站的范围,建议去 上游 提 issue 反馈

收到,后几天抽个空去反馈然后旧关闭本issues

@Mikachu2333
Copy link
Contributor Author

根据 vuepress/ecosystem#109 (comment) 不是这个上游的错…… 得继续往上找……

@Mikachu2333 Mikachu2333 reopened this Apr 30, 2024
@Mikachu2333
Copy link
Contributor Author

So, what can i do…… 对html类的语言一窍不通……

@Mister-Hope
Copy link
Collaborator

You can open an issue at docsearch.. Tell them you are using the default configuration, and want these text to be longer

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

No branches or pull requests

4 participants