Skip to content

Commit

Permalink
enhancement: support mermaid diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
akira committed Jun 5, 2021
1 parent 3cc07c1 commit bb2e857
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,10 @@ copyright:
license: '本文采用<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">知识共享署名-非商业性使用 4.0 国际许可协议</a>进行许可'
# Blog page article timeliness days reminder, 0 for no threshold
outdated_threshold: 0

# mermaid chart
mermaid: ## mermaid url https://github.com/knsv/mermaid
enable: true # default true
version: "7.1.2" # default v7.1.2
options: # find more api options from https://github.com/knsv/mermaid/blob/master/src/mermaidAPI.js
#startOnload: true // default true
9 changes: 9 additions & 0 deletions layout/_partial/base-footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@
<% } %>
</div>
<% } %>
<!-- mermaid -->
<% if (theme.mermaid.enable) { %>
<script src='https://unpkg.com/mermaid@<%= theme.mermaid.version %>/dist/mermaid.min.js'></script>
<script>
if (window.mermaid) {
mermaid.initialize({theme: 'forest'});
}
</script>
<% } %>
</footer>

0 comments on commit bb2e857

Please sign in to comment.