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

mermaid.js diagrams without JavaScript #3715

Closed
4 tasks done
jholdstock opened this issue Mar 14, 2022 · 2 comments
Closed
4 tasks done

mermaid.js diagrams without JavaScript #3715

jholdstock opened this issue Mar 14, 2022 · 2 comments

Comments

@jholdstock
Copy link

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

Mermaid.js diagrams are not rendered when JavaScript is disabled in the browser. Instead, the diagram source is displayed in a code block.

In a perfect world, the mermaid diagram would be rendered at compile time and served statically at run time, completely removing the dependency on client-side JS.

If that isn't feasible, falling back to a static image rather than showing the diagram source would be nice.

Use Cases

Users may choose to run browsers without JavaScript for multiple reasons - eg.hardware/resource constraints, security/privacy concerns. Those users should still be able to view diagrams.

Screenshots / Mockups

No response

@facelessuser
Copy link
Contributor

This would be less of a theme thing then.

You'd have to write your own Markdown plugin and call something like https://github.com/mermaid-js/mermaid-cli or use it manually to generate images you can embed eliminating the need for a plugin. There are also other UML CLI tools, which could be used in one of these ways.

@squidfunk
Copy link
Owner

This is really beyond the scope of this project as @facelessuser already pointed out. It might be solvable by a third-party plugin, but there's no intention to add this functionality to Material for MkDocs natively.

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

3 participants