facebook / facebook/docusaurus

Offline/SSR rendering of Mermaid diagrams

未关闭
#8,299 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
feature
主要语言
TypeScript
星标
66.2k
派生
10k
平均合并
1 天 3 小时
30 天内合并 PR
52

描述

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Description

The mermaid plugin in the recent Docusaurus 2.2.0 release works on the client-side only. Add support for rendering mermaid graphs offline while building the static site.

### Has this been requested on Canny?

_No response_

### Motivation

In some cases (e.g. scraping the website, disabled javascript in the client's browser, avoidance of repositioning/flickering esp. on mobile phones) it would be useful to render the diagrams into .svg resources while building the static site already and then only serve static images.

### API design

_No response_

### Have you tried building it?

_No response_

### Self-service

- [ ] I'd be willing to contribute this feature to Docusaurus myself.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。