Skip to content

v4.10.4

Choose a tag to compare

@tangly1024 tangly1024 released this 06 Jul 09:31

4.10.4

本版本补齐 Notion 2026 年新增 HTML Block 的渲染支持,让 Notion AI 生成或用户上传的 .html 小工具可以在 NotionNext 文章中直接展示。

更新内容

  • 支持 Notion HTML Block 在 API 中返回的 embed + html_artifact 数据结构。
  • 为 HTML artifact 附件补齐 Notion signed URL,并保留原始 attachment: source。
  • 服务端读取 HTML artifact 内容,再通过 sandbox iframe srcDoc 渲染,避免 Notion 附件的下载响应头和 CSP 导致 iframe 空白。
  • 普通外部网页 Embed 仍按原有 iframe 方式渲染。
  • 限制单个 HTML artifact 最大 512KB,避免页面数据过大。
  • 更新版本号、最新 changelog 和示例文章功能说明。

验证

  • git diff --check
  • yarn lint --file components/NotionPage.js --file lib/db/notion/getPostBlocks.js --file lib/db/notion/getNotionAPI.js
  • node -e "const p=require('./package.json'); if (p.version !== '4.10.4') process.exit(1)"
  • yarn docs:site:build