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

Convert Mermaid code block in Markdown file to SVG #1663

Closed
superj80820 opened this issue Sep 7, 2020 · 4 comments
Closed

Convert Mermaid code block in Markdown file to SVG #1663

superj80820 opened this issue Sep 7, 2020 · 4 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@superj80820
Copy link

When Markdown on some platforms like Github does not support Mermaid, the power and convenience of Mermaid cannot be used.

So I often have to convert Mermaid in different tools. Ex. Use mermaid-live-editor to export PNG

This makes development a lot more COPY/PASTE.


So I wrote mermaid-js-converter, which can use command line to convert Mermaid code block strings in Markdown files to SVG.

How to use


The code of this tool is very simple. I created this issue because I thought it might help people who have the same problem as me.

If Mermaid Author thinks this is a cool tool, I am very willing to contribute it.

Thank you.

@superj80820 superj80820 added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Sep 7, 2020
@chaodaiG
Copy link

chaodaiG commented Mar 4, 2022

GitHub now supports mermaid: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

Note to anyone who is trying to use mermaid-js-converter, this tool publishes your diagram onto mermaid-live-editor, so use it with caution if your diagram contains info that you don't want to expose to the public yet

@snomos
Copy link

snomos commented Mar 5, 2022

GitHub now supports mermaid: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

As far as I have been able to find out, this support does not extend to GitHub Pages. Thus we still need services like the one mentioned in this issue. Or a simple GitHub Action that will do the conversion on the fly, and can be easily included in GH Pages workflows. None of the existing actions I have found fits that bill.

@msuzoagu
Copy link

As @snomos points out, this

GitHub now supports mermaid: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

but it appears that a related issue from 2018 is now on someone's radar at Github's parent company so hopefully this issue can be resolved.

@jgreywolf
Copy link
Contributor

Closing as this appears to be an information post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants