Hexo博客添加标签和分类
 配置博客标签
首先要创建一个标签页面,在博客根目录输入
在创建的文章中添加页面类型,如下:
[Blogroot]/source/tags/index.md| 12
 3
 4
 5
 
 | ---title: tags
 date: 2024-05-07 08:53:57
 type: "tags"
 ---
 
 | 
 
在博客中添加标签,比如这篇博客的标签:
[Blogroot]/source/_posts/搭建我的Hexo博客.md| 12
 3
 4
 5
 6
 7
 
 | ---title: 搭建我的Hexo博客
 date: 2024-01-17 13:35:13
 tags:
 - Hexo
 - Blog
 ---
 
 | 
 
部分主题需要取消注释开启tags页面,比如NexT主题:
[Blogroot]/themes/next/_config.yml| 12
 3
 4
 5
 6
 7
 8
 9
 
 | menu:
 
 tags: /tags/ || fa fa-tags
 categories: /categories/ || fa fa-th
 archives: /archives/ || fa fa-archive
 
 
 
 
 | 
 
 博客分类
与博客标签类似,将tags改为categories即可
categories/index.md文件内容如下
[Blogroot]/source/categories/index.md| 12
 3
 4
 5
 
 | ---title: categories
 date: 2024-05-07 09:04:59
 type: "categories"
 ---
 
 | 
 
博客信息部分如下:
[Blogroot]/source/_posts/搭建我的Hexo博客.md| 12
 3
 4
 5
 6
 7
 8
 9
 
 | ---title: 搭建我的Hexo博客
 date: 2024-01-17 13:35:13
 tags:
 - Hexo
 - Blog
 categories:
 - Blog
 ---
 
 |