0%

Hexo 博客 Markdown 和 MathJax 配置

1
2
3
npm install hexo-math –save
npm uninstall hexo-renderer-marked –save
npm install hexo-renderer-kramed –save

Enter node_modules\kramed\lib\rules\inline.js

1
2
3
4
5
//escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/,
escape: /^\\([`*\[\]()#$+\-.!_>])/,

//em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
1
2
3
4
5
6
# MathJax Support
mathjax:
enable: true
per_page: true
#cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_

MathJax Enabled:

\( x_i \)

$s$

$y{1}$