整個過程分類 與 標籤 極其類似,只需要將對應的categories
換成了tags
即可
創建頁面
新建一個頁面命名爲categories
$ hexo new page categories #tags
編輯頁面
編輯新建的頁面source/categories/index.md
---
title: 分類
date: 2018-04-25 22:34:08
type: "categories"
---
---
title: 標籤
date: 2018-04-25 22:34:08
type: "tags"
---
編輯菜單
在菜單中增加鏈接,編輯主題下的_config.yml
, 將menu
中的categories: /categories
註釋去掉:
menu:
home: / || home
categories: /categories/ || th
archives: /archives/ || archive
tags: /tags/ || tags
實際使用
在文章中添加分類
在文章的頭中增加categories
描述
title: hexo 添加標籤和分類
date: 2018-04-27 23:00:34
categories:
- hexo
tags:
- linux
配置別名
在配置中更新別名
其中:
以前的是正式的名稱,以後的是訪問的路徑
category_map:
hexo:hexo
ubuntu:ubuntu
computer vision: computer-vision
tag_map:
linux:linux
ubuntu:ubuntu
vim:vim
tmux:tmux
hexo:hexo
yolo:yolo
opencv:opencv
computer vision:computer-vision
部署生效
一定要記得先clean在生成
$ hexo clean
$ hexo g
$ hexo d
更多更及時的博客更新請戳—> KingRumn