Hello World

这是一个指南

安知鱼主题指南 (gavinblog.github.io)

布局(Layout)

Hexo 有三种默认布局:postpagedraft。在创建这三种不同类型的文件时,它们将会被保存到不同的路径;而您自定义的其他布局和 post 相同,都将储存到 source/_posts 文件夹。

布局 路径
post source/_posts
page source
draft source/_drafts

1 常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
hexo init
hexo clean
hexo generate
hexo server
hexo d

hexo new "postName" #新建文章
hexo new page "pageName" #新建页面
hexo generate #生成静态页面至public目录
hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭server)
hexo deploy #部署到GitHub
hexo help # 查看帮助
hexo version #查看Hexo的版本

# draft
hexo new draft "test"

hexo publish draft "test"

2 公式

1
2
3
4
5
npm un hexo-renderer-marked --save
# or
npm un hexo-renderer-kramed --save
# 安装 `hexo-renderer-markdown-it-plus`
npm i @upupming/hexo-renderer-markdown-it-plus --save
1
2
3
4
5
6
7
8
# 在根目录的 _config.yml 中使用下面的配置将 strict 设置为 false
markdown_it_plus:
plugins:
- plugin:
name: '@neilsustc/markdown-it-katex'
enable: true
options:
strict: false