Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

categories 与 tags文件夹下无内容 #339

Closed
fyales opened this Issue Aug 18, 2015 · 7 comments

Comments

Projects
None yet
7 participants
@fyales
Copy link

fyales commented Aug 18, 2015

自己新建了tags和categories文件夹,但是编译过后没有生成index.html.点击菜单栏上的标签页报Cannot GET /categories/。
hexo自身的_config.yml配置如下:

source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories

Next下_config配置如下:

menu:
  home: /
  categories: /categories
  #about: /about
  archives: /archives
  tags: /tags
  #commonweal: /404.html

希望大神们能够给出解答

@bao3

This comment has been minimized.

Copy link

bao3 commented Aug 25, 2015

@fyales 我已经解决了。问题的原因在于要在 index.md 指定类型,例如 tags/index.md 就要加入 type: “tags” ,如果是分类页,就要在 categories/index.md 里加入 type: "categories"

@fyales

This comment has been minimized.

Copy link
Author

fyales commented Sep 12, 2015

index.md?我不知道这个文件夹在哪,请说详细一点可以么。。。
我现在的解决方案时自己重写head文件。

@iissnan

This comment has been minimized.

Copy link
Owner

iissnan commented Oct 17, 2015

按照 这里的步骤 创建即可

@RainKolwa

This comment has been minimized.

Copy link

RainKolwa commented Jun 8, 2016

STEP1

hexo new page tags

STEP2

打开 /source/tags/index.md,增加type

---
title: tags
date: 2016-06-08 16:19:38
type: "tags"
---

STEP3

打开 /themes/next/_config.yml,找到menu,打开tags的注释,可能是这样

menu:
  home: /
  categories: /categories
  #about: /about
  archives: /archives
  tags: /tags
  #commonweal: /404.html
@scotthou94

This comment has been minimized.

Copy link

scotthou94 commented Aug 12, 2016

@RainKolwa我按照步骤配置了站点的_config和主题的_config还有tag和category的index.md,但是点击我文章的标签转到的tag页面只显示了index.md中的type: tags或者categories/index.md中的type: categories,并没有拥有相应标签的文章

@TracerLee

This comment has been minimized.

Copy link

TracerLee commented Nov 18, 2016

按照@RainKolwa 加了STEP2的type: "tags"就好了

@iissnan iissnan closed this Feb 27, 2017

@Zhang21

This comment has been minimized.

Copy link

Zhang21 commented Aug 31, 2017

type: "tags"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.