-
Notifications
You must be signed in to change notification settings - Fork 53
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
Integrate mermaid or another type of diagram generator in zmarkdown #171
Comments
Mermaid is very specialized. It can create Flowchart, Sequence diagram and Gantt diagram (and so, not graph). The sequence diagrams are hard to read but the flowcharts and Gantt diagram look good. I will try remark-graphviz the dot language is a well-known language. |
we can integrate both. sequence diagram is pretty cool with mermaid. So is flow chart. I think having many tools can be the best way of building a good redaction interface. So if you can add graphviz to zmd & rebber let's do it |
I think the syntax for integrating mermaid should be the same as on gitlab.
And if mermaid uses this syntax, it seems logic to me to use the same kind of syntax for graphviz. |
Hi @vhf I've ssen your PR on their upstream (which does not pass). I do hope it will be merged quickly so that we can integrate mermaid in zmd. |
for this issue the main bottleneck seems to be ternando as they "officialy" maintain remark-mermaid and remark-graphviz but do not review nor accept pr from extern contributors. |
The way these plugins work now are quite unsustainable I'd say:
Forking these utils would add a lot of work to refactor them, in order to make them clean. Once it will be done, we will also need to maintain them. I'm currently working on something else, so I'll not have time to do this anytime soon, but if somebody wants to work on it, he needs to know the work is quite important. We need to fork these if we want to use them, so guess it is not a problem if someone adds them to the |
IMO remark-mermaid code structure isn't that bad. It does spawn a child process but that's to an npm package that we could depend on, not to a completely foreign binary. The one thing we need first and foremost is temando/remark-mermaid#5 If the package could be refactored in a way that doesn't need to shell out it would be a bit better I agree. And if it could be made not to rely on a filesystem being available that would be even better because we could then use it client side, but that's another topic and not a hard requirement. The bundle size would probably be too big anyway. |
Hi, The remark-mermaid project has not been maintained for more than two years. I think it might be interesting for us to fork this project. This feature would be really good for zmarkdown. |
It appears that mermaid-js project released a way to render code into svg => https://mermaid-js.github.io/mermaid/getting-started/usage.html#example-of-a-marked-renderer when zmarkdown uses next remark api #416 we should be able to create a good plugin |
Your link is 404 for me. Anyway, nice if we can now render SVG, will have to see how this work. |
Il fact I made more research and the libraries they use in background to generate a readable svg need a browser to be used (headless or not). The "API" is just a way to ask the browser to render a code. The only way to "integrate mermaid" on zmd is therefore to just create a |
It should be useful for authors to create diagrams only by typing texts.
For this purpose, we can use mermaid which is a very common tool for such purpose.
We can also mention graphviz that has a remark integration.
The text was updated successfully, but these errors were encountered: