-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
[docs] chore: Include a mermaid diagram without the code (not an example) #3922
Comments
Mermaid usage sucks on GitHub. Unlike every other language, a code block is executed rather than displayed. A prefix on the first line like #3927 comment - use backticks without |
Is there a reason not to just use backticks without specifying Mermaid? That would then not render on GitHub, for example, and show you the diagram's markup. |
@flywire - what you are asking about is the opposite of what I need. I need the diagram to be rendered, but do not want the code to be shown. |
@weedySeaDragon the only reason I can recall for converting
We can just edit this check to just split mermaid-example. mermaid/packages/mermaid/src/docs.mts Lines 191 to 192 in cdba2b4
But, we also need to update contribution guidelines and review each PRs thoroughly to verify that people don't simply add Another option is to add a new tag we could use only in our documentation to skip code splitting. |
Definitely don't want to end up in that old situation where some mermaid blocks have code examples and some don't. So it seems like adding a new, explicit tag to use only in the documentation would be the way to do. I think that something that is not like the default
|
Description
We can and should use mermaid diagrams in the documentation -- not as examples, but purely as diagrams.
We need a way to specify that the mermaid mark-up should not be converted to a mermaid example that also shows the code.
Ex: In the contributing documentation, we should show the main steps for contributing code:
This should just be a diagram; we don't want to show the underlying mermaid code.
What is the code tag we want to use?
I'd prefer that anything that is explicitly meant to be an example be tagged with
mermaid-example
and everything that is just to be rendered as a diagram be tagged withmermaid
. This keeps the documentation standardized in line with what is done everywhere else.I know there was some discussion of this before but I don't recall the nuances that went into it. (It was just as I started contributing, I think.)
Steps to reproduce
Create a mermaid diagram in a documentation file (.md).
Run
docs:dev
to see it on a local server.Observe that the source for the diagram is always extracted as code.
Screenshots
No response
Code Sample
No response
Setup
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: