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

update docs to reference mermaidConfig correctly #25

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

antingle
Copy link
Contributor

@antingle antingle commented Aug 2, 2024

I had trouble configuring the Mermaid configuration options for this plugin because mermaidOptions was actually renamed to mermaidConfig. I only realized this when I checked the type annotations on the options object for the plugin. I have updated the docs to correctly reference the name of it, as well as update the link to the Mermaid config schema

@remcohaszing
Copy link
Owner

remcohaszing commented Aug 2, 2024

Thanks! CI is failing, but I don’t see how that’s related to your changes, so I’ll look into it.

You should probably use rehype-mermaid instead of this project though.

@antingle
Copy link
Contributor Author

antingle commented Aug 2, 2024

OK thank you. Why should I use rehype-mermaidjs? I just have a simple use case of displaying Mermaid diagrams on markdown files and this plugin does the job. My previous plugins are also remark. I believe if I want to use rehype-mermaidjs, I also need to install rehype-remark, so that is an additional package.

@wooorm
Copy link

wooorm commented Aug 2, 2024

Depends on your use case indeed.
If you in anyway care about HTML, it’s highly likely you need rehype, and remark-rehype (not the inverse, rehype-remark).
More info here: https://github.com/rehypejs/rehype-remark#what-is-this.
I’d need to know what you’re doing to properly answer what you need

README.md Outdated Show resolved Hide resolved
@remcohaszing remcohaszing merged commit 797be26 into remcohaszing:main Aug 3, 2024
8 checks passed
@remcohaszing
Copy link
Owner

Typically people render markdown to HTML (or MDX to JS). If this is the case, you should use rehype-mermaid. If your goal is to replace mermaid code blocks in markdown files with SVG elements and then emit this as markdown, you should use remark-mermaidjs. This is not a common use case though.

The only reason this project isn’t deprecated, is because it is still used by gatsby-remark-mermaid.

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

Successfully merging this pull request may close these issues.

3 participants