diff --git a/README.md b/README.md index 2019013..d1c38de 100644 --- a/README.md +++ b/README.md @@ -15,135 +15,92 @@ docsify serve ### 文档配置: +```html + + +// Import mermaid + + +``` + ```js +var num = 0; +mermaid.initialize({ startOnLoad: false }); window.$docsify = { - name: 'XXX', - // logo: '/logo1.jpg', - repo: 'https://...', - loadSidebar: true, - alias: { - '/.*/_sidebar.md': '/_sidebar.md' - }, - + nativeEmoji: true, subMaxLevel: 3, - auto2top: true, - // search: 'auto', // 默认值 - markdown: { - renderer: { - text: function (text) { - if (/^==/g.test(text)) { - const escapedText = text.toLowerCase().replace(/^==|==$/g, ''); - return `${escapedText}`; - } - if (/^\%{2}/gm.test(text)) { - return ``; - } - return text; - }, - + code: function(code, lang) { + if (lang === "mermaid") { + return ( + '