Hexo运营维护

生成推送

1
hexo g -d

为文章添加目录

安装插件

1
npm install hexo-toc --save

配置博客根目录下的_config.yml文件

1
2
toc:
maxdepth: 3

在需要展示目录的地方添加:

1
<!-- toc -->

注意:显示的目录只会包含代码段 < !-- toc -->之后的内容

公式使用

安装

1
2
npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it-plus --save

_config.yml中配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
plugins:
- plugin:
name: markdown-it-katex
enable: true
- plugin:
name: markdown-it-mark
enable: false

使 mathjax生效

1
2
title: Hello World
mathjax: true