hexo博客支持公式渲染

安装流程

  1. 电脑安装最新版pandoc
  1. 更新插件:

    1
    2
    3
    4
    npm uninstall hexo-renderer-marked --save
    npm uninstall hexo-math --save
    npm install hexo-renderer-pandoc --save
    npm install hexo-renderer-mathjax --save

  2. 修改配置文件,修改theme/_config.yml中mathjax的设置,如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Math Formulas Render Support
math:
# Default (true) will load mathjax / katex script on demand.
# That is it only render those page which has `mathjax: true` in Front-matter.
# If you set it to false, it will load mathjax / katex srcipt EVERY PAGE.
per_page: true

# hexo-renderer-pandoc (or hexo-renderer-kramed) required for full MathJax support.
mathjax:
enable: true
# See: https://mhchem.github.io/MathJax-mhchem/
mhchem: false

# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) required for full Katex support.
katex:
enable: false
# See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex
copy_tex: false

测试

\[E=mc^2\] \[\int_{a}^{b} x^2 dx\]

Reference

上一篇:
ARM汇编伪指令
下一篇:
ATOMIC操作
本文目录
本文目录