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

The mermaid-extension plugin does not work #821

Open
MaxDudkov opened this issue Sep 3, 2024 · 2 comments
Open

The mermaid-extension plugin does not work #821

MaxDudkov opened this issue Sep 3, 2024 · 2 comments

Comments

@MaxDudkov
Copy link

MaxDudkov commented Sep 3, 2024

Hi, i use the Diplodoc CLI to generate documentation from Markdown. One of the documents contains a Mermaid diagram, but the output does not display the expected diagram.

However, after some quick debugging, it seems to me that this plugin is one of the default plugins (for example, it can be found in the constants.ts file in YFM_PLUGINS). Could you please tell me where I might have made a mistake or how to enable this plugin?

I did not find instructions in the [documentation}(https://diplodoc.com/docs/ru/tools/mermaid) about separately enabling this other plugin for builder

@blacky-i
Copy link

blacky-i commented Oct 1, 2024

Hi! I've also encountered to this issue.
I have used diplodoc-template and created project.

I've edited command and added mermaid-extension explicitly yfm --input docs -e @diplodoc/mermaid-extension --output docs-html

That command created docs-html/_assets/ folder with required .js file. But it still does not work.
But if I add

   <head>
.
.
.
             <script src="../_assets/mermaid-extension.js" async></script>
.
.
.
</head><body>...</body>

Then mermaid diagram render appears on page.

@blacky-i
Copy link

blacky-i commented Oct 1, 2024

Well, found more cleaner solution. key --allowCustomResources does the trick

full command:

yfm --allowCustomResources --input docs -e @diplodoc/mermaid-extension --output docs-html

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

No branches or pull requests

2 participants