正在自动登录…
← 返回项目列表obsidianmd/
obsidianmd/ pele
Pele 是一个将 Mermaid 图表渲染为 SVG 的库,支持 Mermaid 12.1.0 的所有图表类型,适合需要在网页或应用中嵌入图表渲染功能的开发者。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/18 15:11:30 · 查看原文
- 累计 Stars
- 2,961
- 当前热度
- 7~30 天 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/10/18 15:11:30
- 使用方式
通过 npm 安装或从 CDN 加载,提供 render 和 mount 等 API,可在浏览器或 Node 环境中使用。
查看 README 依据
# Pele Pele renders [Mermaid](https://mermaid.js.org) diagrams to SVG. It is small, synchronous, has no runtime dependencies, and uses CSS variables for colors and fonts. Pele supports every diagram type built into Mermaid 12.1.0. Documentation, examples, and a playground are at [pele.run](https://pele.run). ## Install ```sh npm install pele ``` Or load it [from a CDN](https://pele.run/api#using-a-cdn): ```html <script src="https://cdn.jsdelivr.net/npm/pele@1/dist/pele.global.js"></script> <script>
for (const el of document.querySelectorAll('pre.mermaid')) pele.mount(el, el.textContent); </script> ``` ## Use ```ts import { render } from 'pele'; const { svg } = render(`flowchart LR A[Mermaid text] --> B[SVG]`); document.querySelector('#diagram').innerHTML = svg; ``` In a browser, `mount()` renders into an element, reads fonts from CSS, and adapts the layout to the container width: ```ts import { mount } from 'pele'; mount(document.querySelector('#diagram'), text); ``` See the [API](https://pele.run/api) for options and error handling.
- 部署要求
需要 Node.js 环境进行安装和构建,浏览器使用需支持 ES 模块或全局脚本。
查看 README 依据
# Pele Pele renders [Mermaid](https://mermaid.js.org) diagrams to SVG. It is small, synchronous, has no runtime dependencies, and uses CSS variables for colors and fonts. Pele supports every diagram type built into Mermaid 12.1.0. Documentation, examples, and a playground are at [pele.run](https://pele.run). ## Install ```sh npm install pele ``` Or load it [from a CDN](https://pele.run/api#using-a-cdn): ```html <script src="https://cdn.jsdelivr.net/npm/pele@1/dist/pele.global.js"></script> <script>
- 已知限制
Pele 针对 Mermaid 12.1.0 语法,使用自己的布局和视觉风格,可能与其他 Mermaid 渲染器存在差异。
查看 README 依据
Pele targets Mermaid 12.1.0 syntax, with its own layout and visual style. Its parsers are tested against Mermaid's parser specs and with differential fuzzing. ## Develop ```sh npm install npm test npm run build npm run bench ``` The documentation site and playground are in `website/` and use Node 24 and pnpm 12. With nvm: ```sh cd website nvm use pnpm install pnpm dev ``` After installing the website dependencies, run `npm run test:website` from the repository root to check the playground. See [Contributing](CONTRIBUTING.md) for parser testing. ## License
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/10/6 07:32:40
- 首次达标收录
- 2026/10/18 15:06:13
- 统计更新时间
- 2026/10/22 19:20:31
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
模型评估
值得看加权总分 4.1 / 5
由 Jev 模型根据仓库描述与 README 评估,2026/10/18 15:06:13 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。
仓库信息
- 最近推送
- 2026/10/21 03:06:39
- 许可证标识
- NOASSERTION
- Fork 数
- 85
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目