diff --git a/_config.yml b/_config.yml
index f52c7a1..2c0626e 100755
--- a/_config.yml
+++ b/_config.yml
@@ -353,8 +353,8 @@ plugins:
# 需在Markdown文件开头加入mathjax: true
# 推荐使用Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save
mathjax:
- enable: false
- cdn: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML
+ enable: true
+ js: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML
# Katex - The fastest math typesetting library for the web
# https://katex.org/docs/autorender.html
@@ -376,7 +376,7 @@ plugins:
# B -->|option 2| C(Section C)
# ```
mermaid:
- enable: false
+ enable: true
# js: https://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js
js: https://cdn.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js
# Available themes: default | dark | forest | neutral
diff --git a/layout/_partial/plugins/parser/mathjax/script.ejs b/layout/_partial/plugins/parser/mathjax/script.ejs
new file mode 100755
index 0000000..63b1b27
--- /dev/null
+++ b/layout/_partial/plugins/parser/mathjax/script.ejs
@@ -0,0 +1,20 @@
+
+
diff --git a/layout/_partial/plugins/parser/mermaid/script.ejs b/layout/_partial/plugins/parser/mermaid/script.ejs
new file mode 100755
index 0000000..fa9a6d3
--- /dev/null
+++ b/layout/_partial/plugins/parser/mermaid/script.ejs
@@ -0,0 +1,29 @@
+
+
\ No newline at end of file
diff --git a/layout/_partial/plugins/parser/script.ejs b/layout/_partial/plugins/parser/script.ejs
new file mode 100644
index 0000000..f1e95b2
--- /dev/null
+++ b/layout/_partial/plugins/parser/script.ejs
@@ -0,0 +1,6 @@
+<% if (page.mathjax == true) { %>
+ <%- partial('mathjax/script') %>
+<% } %>
+<% if (page.mermaid == true) { %>
+ <%- partial('mermaid/script') %>
+<% } %>
\ No newline at end of file
diff --git a/layout/_partial/scripts/index.ejs b/layout/_partial/scripts/index.ejs
index 4e58315..ce494e7 100644
--- a/layout/_partial/scripts/index.ejs
+++ b/layout/_partial/scripts/index.ejs
@@ -157,6 +157,7 @@
<%- partial('../plugins/comments/script') %>
+<%- partial('../plugins/parser/script') %>
<% if (config.inject && config.inject.script && config.inject.script.length > 0) { %>
diff --git a/layout/mathjax.ejs b/layout/mathjax.ejs
deleted file mode 100755
index 1c3af32..0000000
--- a/layout/mathjax.ejs
+++ /dev/null
@@ -1,29 +0,0 @@
-<% if (theme.plugins.mathjax.enable){ %>
-
-
-
-
-
-
-
-<% } %>
diff --git a/layout/mermaid.ejs b/layout/mermaid.ejs
deleted file mode 100755
index f7df7e1..0000000
--- a/layout/mermaid.ejs
+++ /dev/null
@@ -1,32 +0,0 @@
-<% if (theme.plugins.mermaid.enable) { %>
-
-
-
-<% } %>
diff --git a/layout/page.ejs b/layout/page.ejs
index d837d1d..da2b84e 100755
--- a/layout/page.ejs
+++ b/layout/page.ejs
@@ -12,9 +12,6 @@ function layoutDiv() {
if (page.post_list) {
el += partial('_partial/main/navbar/list_post');
}
- if (page.mermaid == true) {
- el += partial('mermaid');
- }
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
el += partial('_partial/main/navbar/breadcrumb');
}
diff --git a/layout/post.ejs b/layout/post.ejs
index 12d4af4..07f868f 100755
--- a/layout/post.ejs
+++ b/layout/post.ejs
@@ -19,12 +19,6 @@ if (theme.plugins.heti && theme.plugins.heti.enable) {
heti = ' heti';
}
%>
-<% if (page.mathjax == true){ %>
- <%- partial('mathjax') %>
-<% } %>
-<% if (page.mermaid == true){ %>
- <%- partial('mermaid') %>
-<% } %>
<%- partial('_partial/main/navbar/breadcrumb') %>
<%- scrollreveal() %>'>
<%- layoutTitle() %>
diff --git a/layout/wiki.ejs b/layout/wiki.ejs
index cf6a623..c7ead00 100755
--- a/layout/wiki.ejs
+++ b/layout/wiki.ejs
@@ -29,9 +29,6 @@ function layoutTitle() {
page.header = 'auto';
}
%>
- <% if (page.mermaid == true){ %>
- <%- partial('mermaid') %>
- <% } %>
<%- partial('_partial/main/navbar/breadcrumb') %>
<%- scrollreveal() %>'>
<%- layoutTitle() %>