AMAZINGINDEX.COM 让生活多一点 Amazing
57.4
VOL. 2026.10
2026.10.18
← 返回 2026.10.18 日报
日报快照 · Daily Snapshot
NO. 011

Pele:比 Mermaid.js 快 500 倍的 SVG 渲染器

#ARTICLE HackerNews 2026.10.18
推荐指数 64.0 NO. 011 · 2026.10.18
发布2026/10/17Score63Comments8

Pele 是一个零依赖的轻量库,用 CSS 变量即可实时换肤 Mermaid 图表,无需重新渲染。对需要高频生成或自定义主题的技术文档、Dashboard 团队,这是直接替换 Mermaid.js 的候选方案。

Mermaid.js 的痛点从来不是功能少,而是 bundle 体积大、服务端渲染慢、主题定制需要走它的 themeConfig 体系。Pele 把这两个问题一起解了:6KB 体积让 SSR 场景不再头疼,CSS 变量直接接管配色意味着设计系统对接零成本。

真正值得观察的是它的长期兼容性。Mermaid 语法迭代快,Pele 声称支持到 12.1.0,但社区插件生态(如 VS Code 扩展、Notion 集成)能否跟进是 adoption 的关键瓶颈。如果你现在的 Mermaid 用法只是基础流程图和时序图,迁移风险很低,建议直接试跑 benchmark 对比首屏渲染时间。

意见分歧 8 条评论

核心争论:Pele 解决了 Mermaid 服务端渲染痛点,但社区关注开源可见性与现有替代方案成熟度

nickmain

Does the official Mermaid library still require a full or headless browser environment in order to lay out the SVG? If so, Pele is great news for embedding Mermaid rendering in other places.

invokestatic

The python mermaidx library works for this, which works well for generating documentation with embedded diagrams as part of CI/CD but the layout/rendering can sometimes be very wonky. For instance I will have a bunch of connections crossing over each other instead of neatly arranged to avo

Imustaskforhelp

Is pele open source? I tried to find the source code of it but I was unable in finding so Edit: found it, https://github.com/obsidianmd/pele Also folks, this is a good reminder to please have a github icon on the top of the page to easily show git/github links if the app is

替代方案: Mermaid.jsmermaidxmmdc
查看原文 →