From 11ee491c2b38a2d89a4592f79dcb09c8f50749bd Mon Sep 17 00:00:00 2001 From: ZermZhang Date: Tue, 24 May 2022 09:25:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=A2=9E=E5=8A=A0=E6=8C=87=E5=AE=9A=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E6=96=B9=E5=BC=8F=E7=9A=84=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最近版本中发现mathjax默认通过CHTML, 新增了配置项,可以通过配置指定具体的渲染方式,默认渲染方式设置为SVG --- _config.yml | 3 +++ layout/_partials/plugins/math.ejs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index e266b0c1..b790e1dd 100644 --- a/_config.yml +++ b/_config.yml @@ -707,6 +707,9 @@ post: # Options: mathjax | katex engine: mathjax + # 指定mathjax的渲染方式,默认通过'es5/tex-svg.js'进行渲染 + render: 'es5/tex-svg.js' + # 流程图,基于 mermaid-js,具体请见:https://hexo.fluid-dev.com/docs/guide/#mermaid-流程图 # Flow chart, based on mermaid-js, see: https://hexo.fluid-dev.com/docs/en/guide/#mermaid mermaid: diff --git a/layout/_partials/plugins/math.ejs b/layout/_partials/plugins/math.ejs index ae16c66d..9892287a 100644 --- a/layout/_partials/plugins/math.ejs +++ b/layout/_partials/plugins/math.ejs @@ -38,7 +38,7 @@ `) - import_js(theme.static_prefix.mathjax.replace('es5/', ''), 'es5/tex-mml-chtml.js') + import_js(theme.static_prefix.mathjax.replace('es5/', ''), theme.post.math.render || 'es5/tex-svg.js') %> <% } else if (theme.post.math.engine === 'katex') { %>