1$ npm install hexo-math --save
在站点配置文件_config.yml
中添加:
1math:
2 engine: 'mathjax' # or 'katex'
3 mathjax:
4 # src: custom_mathjax_source
5 config:
6 # MathJax config
在 next 主题配置文件中 themes/next-theme/_config.yml
中将 mathJax
设为 true
:
1# MathJax Support
2mathjax:
3 enable: true
4 per_page: false
5 cdn: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
也可以在文章的开始集成插件支持,但不建议这么做:
1<script type="text/javascript"
2 src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
3</script>
除另有声明外,本博客文章均采用 知识共享 (Creative Commons) 署名 4.0 国际许可协议 进行许可。转载请注明原作者与文章出处。