一、在博客根目录新建

1
2
3
4
5
6
7
8
9
10
11
_config.next.yml

math:
enable: true
per_page: true
mathjax:
enable: true
src: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
katex:
enable: false

二、在文章顶部加上

1
2
3
4
5
6
title: 测试公式
date: 2026-04-12 13:30:00
mathjax: true # 👈 就加这行
---
这里写公式 $E=mc^2$

三、运行

1
2
3
hexo clean
hexo g
hexo s
0%