Skip to content

[Feature]: 使Mermaid为Server-side rendering (SSR)  #227

@noctiro

Description

@noctiro

Is your feature request related to a problem?

有Mermaid图表的博客文章,打开会有明显的卡顿,如示例博客中的:

Markdown Mermaid 图表 - Firefly

客户端 Mermaid 渲染会阻塞主线程,导致页面卡死。在此期间,浏览器完全无响应,无法滚动、点击或选中任何内容。这在包含复杂或多个图表的页面上尤为明显,严重影响用户体验。

Image

Describe the solution you'd like

上游项目mermaid-js/mermaid有对应的issue: mermaid-js/mermaid#3650 ,但是功能至今未能实现

近期Github上出现了一个新项目,1jehuang/mermaid-rs-renderer,可以试试,先预处理好mermaid图表,这样能够大幅提升网页加载速度

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions