之前博客的tags以及categories点击都是404,这个问题一直放着没管。现在不是放暑假了,花点时间把它解决了。

方法一(在source目录下默认无categories和tags子目录):

  1. 新建categories和tags子目录以及相应文件
1
hexo new page "categories"
1
hexo new page "tags"
  1. 编辑tags/index.md和categories/index.md文件
1
2
type: "tags"
layout: "tags"
1
2
type: "categories"
layout: "categories"

方法二:

  1. 编辑scaffolds/draft.md
1
2
3
4
---
title: {{ title }}
tags: {{ tags }}
---
  1. 编辑scaffolds/post.md
1
2
3
4
5
---
title: {{ title }}
date: {{ date }}
tags: {{ tags }}
---
  1. 编辑tags/index.md
1
2
3
4
5
6
---
title: Tagcloud
date: 2017-04-26 17:47:43
type: "tags"
layout: "tags"
---

Comments

⬆︎TOP