hexo渲染数学公式
hexo 渲染数学公式(水一篇)
我用的是 butterfly 主题
1. 安装插件
1 | npm install hexo-filter-mathjax |
2. 配置
在根目录下的_config.yml
中添加以下配置:
1 | mathjax: |
3. 在文章中使用
在文章的 Front-matter 中添加mathjax: true
,然后在文章中使用$$
包裹数学公式即可。
1 | --- |
4. 重新生成即可
https://zephyruston.github.io/2025/03/28/hexo%E6%B8%B2%E6%9F%93%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F/
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.