Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝配置文件中增加指定渲染方式的配置项 #756

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/plugins/math.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</script>
`)

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') { %>
Expand Down