diff --git a/_config.yml b/_config.yml
index 3fac7d6..b2ec401 100755
--- a/_config.yml
+++ b/_config.yml
@@ -84,7 +84,6 @@ article:
auto_cover: true # 如果没有封面就根据 tags 作为关键词搜索封面,开了此项将不会自动从文章中提取首张图片作为封面了。
-
######## Comments ########
comments:
service: # beaudar, utterances, valine, twikoo, waline
@@ -303,6 +302,13 @@ plugins:
enable: false
css: https://unpkg.com/heti/umd/heti.min.css
js: https://unpkg.com/heti/umd/heti-addon.min.js
+
+ # MathJax
+ # 需在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
style:
diff --git a/layout/mathjax.ejs b/layout/mathjax.ejs
new file mode 100755
index 0000000..1c3af32
--- /dev/null
+++ b/layout/mathjax.ejs
@@ -0,0 +1,29 @@
+<% if (theme.plugins.mathjax.enable){ %>
+
+
+
+
+
+
+
+<% } %>
diff --git a/layout/post.ejs b/layout/post.ejs
index 43c5270..9f9711c 100755
--- a/layout/post.ejs
+++ b/layout/post.ejs
@@ -19,6 +19,9 @@ if (theme.plugins.heti && theme.plugins.heti.enable) {
heti = ' heti';
}
%>
+<% if (page.mathjax == true){ %>
+ <%- partial('mathjax') %>
+<% } %>
<%- partial('_partial/main/navbar/breadcrumb') %>
<%- scrollreveal() %>'>
<%- layoutTitle() %>