dsh-tool-notion

Notion 区块与 Markdown 双向转换,不带 API 客户端、无外部依赖。Notion 的段落是一组富文本 run,而 Markdown 只有一个字符串 —— 所以两个方向分别是「切分」与「合并」,并不是一对互逆操作:一个方向在每个注解边界切开 run,另一个方向把相邻同注解的 run 重新合并,内容本身含反引号时自动加宽围栏。每一步有损转换都会报出来,而不是默默吞掉。

插件介绍

Notion 区块与 Markdown 双向转换,不带 API 客户端、无外部依赖。Notion 的段落是一组富文本 run,而 Markdown 只有一个字符串 —— 所以两个方向分别是「切分」与「合并」,并不是一对互逆操作:一个方向在每个注解边界切开 run,另一个方向把相邻同注解的 run 重新合并,内容本身含反引号时自动加宽围栏。每一步有损转换都会报出来,而不是默默吞掉。

安装方式

通过 npm 安装

dsh plugin --profile web add dsh-tool-notion

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

从 GitHub 安装

dsh plugin --profile web add github:yuehancn/dsh-tool-notion

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。

安装提示

  • 可能调用终端命令