Skip to content

Commit

Permalink
feat: add mermaid support
Browse files Browse the repository at this point in the history
  • Loading branch information
yjulm committed May 29, 2022
1 parent 46d3a3b commit 98a46cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@
"type": "textarea",
"note": ""
},
{
"name": "mermaid",
"label": "是否开启 Mermaid 流程图支持",
"group": "杂项",
"type": "switch",
"value": false,
"note": ""
},
{
"name": "ga",
"label": "跟踪 ID",
Expand Down
5 changes: 5 additions & 0 deletions templates/includes/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
<!-- DEMO JS -->
<!--<script src="media/scripts/index.js"></script>-->

<% if (site.customConfig.mermaid) { %>
<script src="https://cdn.jsdelivr.net/npm/mermaid@9.1.1/dist/mermaid.min.js"></script>
<script>mermaid.initialize({startOnLoad:true});</script>
<% } %>

<% if (site.customConfig.ga) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= site.customConfig.ga %>"></script>
<script>
Expand Down

0 comments on commit 98a46cb

Please sign in to comment.