博客支持latex教程

数学公式katex

更换插件

1
2
3
4
复制成功npm un hexo-renderer-marked --save # 卸载 marked 插件
npm un hexo-renderer-kramed --save # 卸载 kramed 插件
npm i hexo-renderer-markdown-it --save # 安装渲染插件
npm install @neilsustc/markdown-it-katex --save # 安装katex插件

butterfly的_config.yaml配置启动latex插件

1
2
3
4
5
6
7
# Math (數學)

# KaTeX
katex:
enable: true
per_page: false
hide_scrollbar: true

主目录_config.yml配置中增加

1
2
3
4
5
6
复制成功markdown:
plugins:
- plugin:
name: '@neilsustc/markdown-it-katex'
options:
strict: false

markdown配置开启latex

1
2
3
4
5
6
7
8
9
---
title: bert详解
date: 2024-03-31 14:51:21
katex: true
category:
- ai
tag:
- ai
---

效果:

image.png