[英]It is possible to have sphinx MyST rendering mermaid
It is possible to make work mermaid inside \.md
file with MyST md driver?可以使用 MyST md 驱动程序在
\.md
文件中制作工作美人鱼吗?
For now the only way I found is现在我找到的唯一方法是
$ tail conf.py
extensions = [ 'recommonmark', 'sphinxcontrib.mermaid']
from recommonmark.transform import AutoStructify
def setup(app):
app.add_transform(AutoStructify)
$
The below is rendered with recommonmark
:下面是用
recommonmark
呈现的:
```mermaid::
graph LR
a --> b
```
but not with MyST-parser
但不是
MyST-parser
I have open this issue in MyST: https://github.com/executablebooks/MyST-Parser/issues/366我在 MyST 中打开了这个问题: https://github.com/executablebooks/MyST-Parser/issues/366
Note: recommonmark
does not render correctly tables that's why I try to use MyST-parser
注意:
recommonmark
不能正确呈现表格,这就是我尝试使用MyST-parser
的原因
mermaid
is prefectly integrated to MyST-parser
. mermaid
与MyST-parser
完美集成。
You only need to call it like that with {mermaid}
:你只需要用
{mermaid}
来这样称呼它:
```{mermaid}
graph LR
a --> b
```
No need to define in conf.py
a def setup(app):
only:无需在
conf.py
中定义def setup(app):
仅:
extensions = ['myst_parser', 'sphinxcontrib.mermaid']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.