Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagram Generation #394

Open
rtkelly13 opened this issue Feb 16, 2022 · 5 comments
Open

Diagram Generation #394

rtkelly13 opened this issue Feb 16, 2022 · 5 comments

Comments

@rtkelly13
Copy link

rtkelly13 commented Feb 16, 2022

I'm always looking for ways to automatically generate diagrams in blog posts using DSLs rather than WYSIWYG solutions.

I've read this blog post from GitHub where they have integrated a really nice looking solution for using diagram generation from MD files
https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

There is a plugin for remark which seems like it could integrate easily.
https://github.com/sjwall/mdx-mermaid

I've already considered a solution using draw.io integrated into VSCode using SVG diagrams. This was in a previous issue on this repo as a good solution to solve this issue. Without being tied specifically to a VSCode and one extension, especially now this project.

Given the large amount of supported platforms this doesn't seem too big of a risk to add
https://mermaid-js.github.io/mermaid/#/./integrations

Would you be interested in me trying this out an possibly posing a PR if it works well enough?

@rtkelly13 rtkelly13 changed the title Diagrams Generation Diagram Generation Feb 16, 2022
@aloisdg
Copy link
Contributor

aloisdg commented Feb 16, 2022

I prefer PlantUML to Mermaid, but Mermaid is better than nothing.

https://wyssmann.com/blog/2021/03/diagrams-as-code-plantuml-or-mermaid/

@timlrx
Copy link
Owner

timlrx commented Feb 16, 2022

I don't really like the approach taken by mdx-mermaid. It basically injects mermaid.js as a dependency and renders the markup as a SVG on the client-side.

There's a discussion on remarksjs about adding mermaid support as well. Given that they have just introduced it on Github, I will just wait for the core maintainers of remarkjs to decide how best to handle it and not accept a PR till then.

There's a related thread here as well: remcohaszing/remark-mermaidjs#3

@aloisdg
Copy link
Contributor

aloisdg commented Feb 16, 2022

Note that mermaid is included in gitlab for a while

@zlwu
Copy link

zlwu commented Mar 2, 2023

I don't really like the approach taken by mdx-mermaid. It basically injects mermaid.js as a dependency and renders the markup as a SVG on the client-side.

There's a discussion on remarksjs about adding mermaid support as well. Given that they have just introduced it on Github, I will just wait for the core maintainers of remarkjs to decide how best to handle it and not accept a PR till then.

There's a related thread here as well: remcohaszing/remark-mermaidjs#3

Maybe we can use mermaid-cli to compile *.mmd file (mermaid source file) to svg directly.

@danielmackay
Copy link

Any update on this? I would love to be able to render Mermaid diagrams natively within the template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants