hexo 下的分类和表签无法显示

2017-09-01 geekspeng 更多博文 » 博客 » GitHub »

hexo

原文链接 http://geekspeng.cn/2017/09/01/hexo-%E4%B8%8B%E7%9A%84%E5%88%86%E7%B1%BB%E5%92%8C%E8%A1%A8%E7%AD%BE%E6%97%A0%E6%B3%95%E6%98%BE%E7%A4%BA.html
注:以下为加速网络访问所做的原文缓存,经过重新格式化,可能存在格式方面的问题,或偶有遗漏信息,请以原文为准。


在命令行中输入hexo new page tags

$ hexo new page tags

这时会在在sources/tags里面有个index.md的文件,打开这个文件编辑

---
title: tags
date: 2017-08-28 08:33:46
type: "tags"
---

type: 改成tags

<!-- more -->

在主题配置文件中,在menu项下,要把tags页打开如

menu:
  home: /
  archives: /archives
  tags: /tags    //确保标签页已打开  
  categories: /categories  
  about: /about

在你要发布的文章中添加标签

---
title: hexo 下的分类和表签无法显示
date: 2017-08-28 08:33:46
tags: [hexo]
categories: [hexo]
---

所有冒号后面都有个空格