feat: mermaid support for markdown
This commit is contained in:
@@ -249,6 +249,7 @@
|
||||
<script>
|
||||
import { StatusIndicator } from 'vue-status-indicator'
|
||||
import Prism from 'prismjs'
|
||||
import mermaid from 'mermaid'
|
||||
import { get } from 'vuex-pathify'
|
||||
import _ from 'lodash'
|
||||
import ClipboardJS from 'clipboard'
|
||||
@@ -432,6 +433,12 @@ export default {
|
||||
// -> Highlight Code Blocks
|
||||
Prism.highlightAllUnder(this.$refs.container)
|
||||
|
||||
// -> Render Mermaid diagrams
|
||||
mermaid.mermaidAPI.initialize({
|
||||
startOnLoad: true,
|
||||
theme: this.$vuetify.theme.dark ? `dark` : `default`
|
||||
})
|
||||
|
||||
// -> Handle anchor scrolling
|
||||
this.$nextTick(() => {
|
||||
if (window.location.hash && window.location.hash.length > 1) {
|
||||
|
Reference in New Issue
Block a user