-
Notifications
You must be signed in to change notification settings - Fork 2
请教一下如何获取到数据库绑定块id的面包屑 #71
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
Comments
Thank you for your feedback! We appreciate you taking the time to contribute. We usually respond within 7 days. To ensure you don't miss any updates, we recommend subscribing to email notifications or checking back regularly. Also, Thank you for starring our repository!🌟 |
如果能获取到面包屑的话,写入到文档的属性里 感觉会方便点 还能实时更新 |
好像没什么好办法。 1. 获取块面包屑官方有获取 块面包屑 的接口,层级导航中的闪卡块面包屑也走的这个;
参数示例:id就是块id
获取数据库中各个块的id,可以参考 2. 更新数据库整个文档的层级结构似乎并不在数据库中保存,因此无法通过sql获得;装一个 我能想到的只有
我感觉做成插件、手动触发更合适。 3. 开销似乎没有办法及时的获取到块位置变化,也就做不到实时更新; 我这边获取块面包屑的api延迟18ms,小范围(仅数据库显示中的内容)或许还行;但数据量大的话…… |
直接写入为块的属性 用模板列读取就行 这样也能动态更新 开销不是很大 一次就几十个 |
哦,明天吧,我摸鱼的时候整理一下,或者上面参考的api应该就够用了。 |
https://gist.github.com/OpaqueGlass/8ac0ee90c9762b5c47ef7910488bccee 直接添加到代码片段,使用时, |
好用 感谢 |
ok,那我关闭issue了。 |
佬我拿一个大数据库测了一下 每次只会跑16个id是咋回事 |
思源加了分页限制,我更新了,再试一下呢? |
好了 |
分页还是有点问题,思源没有按照固定的顺序返回,导致有一些重复和遗漏; 修改一下
为
吧 |
我会用https://ld246.com/article/1727358874893里的脚本收集标识过的块到数据库 但是没有面包屑很难排序 面包屑可以不包含文档标题和其他标题,但是必须有一级标题,模板列用sql也不太好实现 问了d也说面包屑是实时计算,所以问问有没有办法
The text was updated successfully, but these errors were encountered: