Skip to content

Commit

Permalink
feat: new disableMathJaxMenu option
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Jan 8, 2020
1 parent 56a9e1d commit b759b6e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config-examples/en-us/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ uglyURLs = false
# `mathjax` in post’s Front Matter
# has a higher priority than here

disableMathJaxMenu = false


######################################
# Comments
Expand Down
3 changes: 3 additions & 0 deletions config-examples/zh-cn/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ uglyURLs = false
# 说明:文章的 Front Matter 中的 `mathjax`
# 的优先级高于此处

# 是否禁用 MathJax 的右键菜单
disableMathJaxMenu = false


######################################
# 评论
Expand Down
7 changes: 7 additions & 0 deletions layouts/partials/third-party/mathjax.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
loader: {
load: ['[tex]/mhchem']
},
{{ if .Site.Params.disableMathJaxMenu }}
options: {
renderActions: {
addMenu: [0, '', '']
}
},
{{ end }}
tex: {
inlineMath: {'[+]': [['$', '$']]},
tags: 'ams',
Expand Down

0 comments on commit b759b6e

Please sign in to comment.