-
Notifications
You must be signed in to change notification settings - Fork 65
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
Mermaid Diagrams #147
Comments
I have the same problem, this also happens with Markmap. When I remove techdocs-core from the plugins list, both work perfectly. |
It looks like this might be also related to #128 |
The recommended way to use mermaid diagrams with TechDocs is to use the addon defined here: https://www.npmjs.com/package/backstage-plugin-techdocs-addon-mermaid. Can you try that addon and let me know if it works for you? One limitation is that it's not possible to preview using the techdocs-cli, but it will work when reading the docs in backstage. |
@agentbellnorm no, it does not work. As soon as I add
diagrams are not getting rendered, and the following warnings start popping up:
I cannot really remove the plugin either since |
Tracking it down: looks like the warnings have anything to do with the problem. |
I narrowed it down to this: the order in which When But when I tried to update my local Is t here a chance that you validate this approach and publish a new version @johnphilip283 @agentbellnorm ? |
Hmmmm, trying the suggestion by @AlexeyRaga and changing a local copy of the |
@AtebMT It does render it locally but does not when in Backstage, right? I have figured that now we need to add thing like
to PLUS it looks like Backstage needs to be Which is my problem currently because it doesn't build after the upgrade due to |
We are also facing the same issue. Serving I verified that this works when we remove:
and replace it with:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We are currently using kroki but were looking to switch to client-side mermaid. Having to run our own kroki service feels like overkill, and the container has CVEs that sometimes are not remediated quickly |
@PeaWarrior Is there anything special we need to do after upgrading to mkdocs-techdocs-core 1.4.2 to get mermaid diagrams working? I tried upgrading but I still can't see the diagram. The mkdocs config looks like this:
|
Hey @martina-equinix. You might need to add Unfortunately the fix only works if you're serving through mkdocs. If serving via Techdocs, the external JavaScript gets removed from the sanitizer for security reasons which is what mermaid relies on at run time. Here is some ways to get around it. backstage/backstage#24568 |
Mermaid docs should be working with the Material for Mkdocs version that is in the techdocs container but they do not.
https://squidfunk.github.io/mkdocs-material/reference/diagrams/
I have added to my mkdocs.yml:
I have this in my doc:
I see this in Backstage:
The text was updated successfully, but these errors were encountered: