diff --git a/_config.yml b/_config.yml
index 901449d..8bc1282 100755
--- a/_config.yml
+++ b/_config.yml
@@ -310,6 +310,15 @@ plugins:
enable: false
cdn: 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
+ # https://github.com/KaTeX/KaTeX
+ # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器:npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save
+ katex:
+ enable: false
+ min_css:
+ min_js:
+ auto_render_min_js:
style:
darkmode: auto # auto / always / false
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
index 9b02e82..7a650f5 100755
--- a/layout/_partial/head.ejs
+++ b/layout/_partial/head.ejs
@@ -86,6 +86,12 @@ function og_args() {
<%- css(theme.style.codeblock.highlightjs_theme) %>
<% } %>
+ <% if (theme.plugins.katex && theme.plugins.katex.enable) { %>
+ <%- theme.plugins.katex.min_css %>
+ <%- theme.plugins.katex.min_js %>
+ <%- theme.plugins.katex.auto_render_min_js %>
+ <% } %>
+
<% if (config.inject && config.inject.head){ %>
<% (config.inject.head||[]).forEach(function(item){ %>