hexo 添加标签和分类

3 篇文章 0 订阅

title: hexo 添加标签和分类
date: 2018-04-27 23:00:34
categories:

  • hexo
    tags:
  • linux
  • hexo
  • ubuntu

下文描述的操作均在next主题上应用。

整个过程分类标签 极其类似,只需要将对应的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

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值