feat: 粘贴链接支持转为 Notion 风格书签卡片 - #1176
Open
ushaio wants to merge 2 commits into
Open
Conversation
added 2 commits
July 31, 2026 11:47
- 新增 bookmarkCard 节点扩展:以 ```bookmark 代码块(JSON)形式存储于 Markdown,卡片展示标题/描述/站点/封面,点击用系统浏览器打开, 支持刷新元数据与转回普通链接 - 粘贴纯 URL 时自动插入链接并选中,触发气泡菜单浮窗; 在"打开链接"右侧新增"粘贴为卡片"按钮 - 元数据抓取复用 web-capture(标题/摘要/og:image/站点名), 失败时降级为域名简卡片并可重试;保存时未完成抓取的卡片 下次打开自动续抓 - StreamdownRenderer 预览/导出同步渲染书签卡片 - 补充五种语言文案
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
功能说明
粘贴链接时可像 Notion 一样将其转换为书签卡片,自动抓取网页标题、描述、站点名与封面图。
[文本](url)源码编辑态)时,同样可通过该按钮转换实现
```bookmark代码块内嵌 JSON(url/title/description/icon/cover/siteName)形式存储,Markdown 往返无损,元数据本地化、打开文件无需重新联网;在其他渲染器中降级为代码块显示bookmarkCard(bookmark-extension.tsx),结构参照现有 mermaid 扩展(atom 节点 + NodeView + markdownTokenizer/renderMarkdown/parseMarkdown)capturePublicWebPage()(20s 超时);抓取失败(登录墙/验证码等)降级为域名简卡片并可点刷新重试;保存时尚未完成抓取的卡片,下次打开文件自动续抓StreamdownRenderer注册了 bookmark 代码块渲染,预览与 PDF 导出显示同样式卡片(JSON 非法时降级为普通代码块)测试
tsc --noEmit/ eslint 通过截图