Contents
  1. 1. Create the Categories Page
  2. 2. Create the Tags Page
  3. 3. Set Categories and Tags for a Post**

1. Create the Categories Page

  Run the following code in the website’s root directory.

hexo new page categories

  A categories folder will be generated in the Hexo\source directory, with an index.md file inside. Open this file and change type to categories.

title: 分类
date: 2021-08-16 10:27:28
type: "categories"
comments: false

2. Create the Tags Page

  The Tags page is created in the same way as the Categories page. Run the following code in the website’s root directory.

hexo new page tags

  A tags folder will be generated in the Hexo\source directory, also with an index.md file inside. Open this file and change type to tags.

title: 分类
date: 2021-08-16 10:27:28
type: "tags"
comments: false

3. Set Categories and Tags for a Post**

  Create a .md file in the Hexo\source_posts directory to create a new blog post, then add the following code at the beginning of the post.

---
title: 这里是文章的标题
date: 这里是发表时间,如:2021-08-15 08:15:16
description: 这里填写摘要。也可以把摘要这一段删去,在文章中想要截断的地方加入<!--more-->,这样在首页就只显示开头到截断的内容,而不会显示全文
categories:
- 分类
- 子分类
tags:
- 标签1
- 标签2
---