Skip to content

Commit

Permalink
feat: update mermaid plugin configuration and implementation #470
Browse files Browse the repository at this point in the history
- Updated mermaid plugin version to 11.4.1 in _config.yml
- Added conditional loading of mermaid script based on version in scripts.ejs
- Removed outdated Tailwind CSS styles in tailwind.css
  • Loading branch information
EvanNotFound committed Dec 1, 2024
1 parent 931e83c commit dc93991
Show file tree
Hide file tree
Showing 5 changed files with 1,489 additions and 449 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ plugins:
# Mermaid JS. Requires hexo-filter-mermaid-diagrams (npm i hexo-filter-mermaid-diagrams). See https://mermaid.js.org/
mermaid:
enable: false # enable mermaid or not
version: "9.3.0" # default v9.3.0
version: "11.4.1" # default v11.4.1
# PLUGINS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end


Expand Down
6 changes: 5 additions & 1 deletion layout/components/scripts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
<% } %>

<% if (theme.plugins.mermaid.enable) { %>
<%- renderJS('libs/mermaid.min.js') %>
<% if (theme.plugins.mermaid.version === '11.4.1') { %>
<%- renderJS('libs/mermaid.min.js') %>
<% } else { %>
<script src="https://cdn.jsdelivr.net/npm/mermaid@<%= theme.plugins.mermaid.version %>/dist/mermaid.min.js"></script>
<% } %>
<%- renderJS('plugins/mermaid.js') %>
<% } %>

Expand Down
2 changes: 1 addition & 1 deletion source/css/build/tailwind.css

Large diffs are not rendered by default.

1,920 changes: 1,475 additions & 445 deletions source/js/libs/mermaid.min.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion source/js/libs/mermaid.min.js.map

Large diffs are not rendered by default.

0 comments on commit dc93991

Please sign in to comment.