Skip to content

Instantly share code, notes, and snippets.

@vedmalex
Last active February 28, 2021 01:15
Show Gist options
  • Select an option

  • Save vedmalex/88830bdf64a45b745e142eef9e5c805d to your computer and use it in GitHub Desktop.

Select an option

Save vedmalex/88830bdf64a45b745e142eef9e5c805d to your computer and use it in GitHub Desktop.
fix: mermaid for vuePress without reject

sample mermaid project

graph TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[Car]
Loading
<template>
</template>
<script>
export default {
mounted() {
import("mermaid/dist/mermaid").then(m => {
m.initialize({
startOnLoad: true,
});
m.init();
});
}
};
</script>
@avimehenwal
Copy link

This is awesome, works for me ๐Ÿ˜„

vuepress/1.5.0
mermaid 8.5.1

Thankyou ๐Ÿ™‡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment