分类

进入hexo博客所在的根目录,输入如下命令:

1
hexo new page categories

成功后提示:

1
INFO  Created: D:\Hexo\source\categories\index.md

index.md的内容如下:

1
2
3
4
---
title: categories
date: 2020-12-20 20:26:06
---

需要修改为

1
2
3
4
5
6
7
---
title: 分类
date: 2020-12-20 20:26:06
type: "categories"
layout: categories
comments: false
---

标签

在控制台中输入如下命令:

1
hexo new page tags

成功后提示:

1
INFO  Created: D:\Hexo\source\tags\index.md

index.md的内容如下:

1
2
3
4
---
title: tags
date: 2020-12-20 20:51:11
---

修改为

1
2
3
4
5
6
7
---
title: 标签
date: 2020-12-20 20:51:11
type: "tags"
layout: tags
comments: false
---

修改模板

修改scaffolds中的post模板

1
2
3
4
5
6
7
8
9
---
title: {{ title }}
date: {{ date }}
categories:
- 文章分类
tags:
- 文章标签
toc: true
---