Closed hartmanjan1970 closed 1 year ago
My goal is to automate generation of images from the diagrams. If i use mmdc -e png -i ./site/mermaid/*.md Then for all .md files in the folder the images are generated content wise correctly as png but the file is called myfile.md-1.svg Is there some other way to get this working or is this a bug?
~Duplicate of https://github.com/mermaid-js/mermaid-cli/issues/394~ _Edit: _Ah, it looks like @GitHub doesn't understand this unless it's in a comment by itself.
It is a bug. It's been fixed on the master
branch, but it hasn't yet been officially published. This project tries to follow the main mermaid version numbering scheme, so we try to bundle minor bug-fixes/features with mermaid updates. There's just recently been a mermaid release, so there will probably be a new mermaid-cli release very soon!
secondly i have a question for output file placement: Is there a way to define an output folder to place the generated images?
I believe they're put in the same folder as the generated markdown file, so you can decide that by adding --output ./my/directory/structure/my-output-file.md
and your output should appear as:
./my/directory/structure/my-output-file.md
(markdown file)./my/directory/structure/my-output-file.md-1.svg
(image 1)./my/directory/structure/my-output-file.md-2.svg
(image 2)If you mean that you want them in a separate directory from the markdown file, that's currently not supported, but you're welcome to make a new GitHub Issue as a feature request.
You may find other mermaid markdown-renderer specific plugins like https://github.com/raghur/mermaid-filter more useful, as this project tries not to use syntax specific to a single Markdown renderer, unlike other projects.
Duplicate of https://github.com/mermaid-js/mermaid-cli/issues/394
My goal is to automate generation of images from the diagrams. If i use
mmdc -e png -i ./site/mermaid/*.md
Then for all .md files in the folder the images are generated content wise correctly as png but the file is calledmyfile.md-1.svg
Is there some other way to get this working or is this a bug?secondly i have a question for output file placement: Is there a way to define an output folder to place the generated images?
thanks