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

分类重复还是存在,最新版的Hexo #427

Closed
larshanw opened this issue Jan 10, 2014 · 17 comments
Closed

分类重复还是存在,最新版的Hexo #427

larshanw opened this issue Jan 10, 2014 · 17 comments
Labels
question Needs help in usage

Comments

@larshanw
Copy link

是我的环境问题吗?
Ubuntu 12.04 和 node v0.10.24
db.json 和 public 都删了,无效= =
现在是全删重装 Hexo 了...

@chenall
Copy link
Contributor

chenall commented Jan 10, 2014

分类名一样,但路径不一样吧.
注意看下路径..
hexo默认不支持多个一级分类,你写上多个分类时变成了子分类.
比如以下两个文章

categories: 
- 测试
- 介绍

另一篇

categories: 
- 介绍
- 测试

它们的分类是不一样的,最终会产生两个同名分类.

有兴趣可以试试我制作的主题
https://github.com/chenall/hexo-theme-chenall

这个应该是目前唯一支持多个分类的主题了.像上面的例子就不会出现同名分类,

@larshanw
Copy link
Author

@chenall 不是,我就是只有两篇文章,两篇文章的分类完全不同,重复的两个分类是完全一样的。

@tommy351
Copy link
Member

你可以把兩篇文章的front-matter部分貼出來嗎

@larshanw
Copy link
Author

@tommy351 额,我不是说我都删了吗...

@tommy351
Copy link
Member

那你是要我怎麼debug,我可不會讀心術啊

@chenall
Copy link
Contributor

chenall commented Jan 11, 2014

楼主"全删重装hexo"然后问题解决了吗?
如果没有解决,可以把作者所需要的文章头部信息贴上来.这样可以方便解决问题.

@larshanw
Copy link
Author

@tommy351 sorry啊... 我记得头部没什么特殊的,只不过我把所有的 variable 都填上了,对那个重复分类的文章的内容修改了好几次,最后是发现分类定错了,就把分类改了再重新 hexo generate --deploy 就出现重复情况了。

@larshanw
Copy link
Author

@chenall 没解决呢,我是把 hexo init 的文件夹和 deploy 的文件夹给删了,没把整个hexo给删了...

@chenall
Copy link
Contributor

chenall commented Jan 11, 2014

你可以贴出文章头部的信息 像这样的.

---
date: 2013-12-28 15:20
layout: post
title: 介绍
tags:
- hexo
- theme
- chenall
categories: 
- 测试
- 介绍
---

@larshanw
Copy link
Author

@chenall 我的头部信息没什么特殊的,只不过把所有的 layout title date updated comments tags categories permalink 都填上了。不过我的 tags 是这样写的:

tags: [Hexo, Blog]

分类是只有一直,是这样写的:

categories: Blog

@larshanw larshanw reopened this Jan 11, 2014
@larshanw larshanw reopened this Jan 11, 2014
@larshanw
Copy link
Author

@tommy351 http://airlar.com/
VPS重装后还是出现了,头部:https://gist.github.com/larshanw/8368734

@larshanw
Copy link
Author

@tommy351 能解决吗,是我的问题吗?

@codermango
Copy link

一直没搞懂front-matter是什么意思。。。

@kenspirit
Copy link
Contributor

刚想从Jekyll转来测试一下,我的 blog 也是有同样的问题。
可以从 https://github.com/kenspirit/kenspirit.github.io 拿 source branch 的 _posts generate 一下就可以重现了。

@chenall
Copy link
Contributor

chenall commented Jan 26, 2014

试了一下,这个是因为主题调用list_categories 辅助插件的原因.

list_categories 看了一下里面有一些错误,

主要是arr.push(html);

不过我不是很明白这个的流程或者说是作者的想法,要等作者修复

@larshanw
Copy link
Author

@chenall 很感谢现在还关注这个问题,总感觉问题出在我这里,文章的 front-matter 我也贴出来了。

@kenspirit
Copy link
Contributor

@chenall 是的,我也尝试看了一下代码,暂还没有看到问题在哪里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Needs help in usage
Projects
None yet
Development

No branches or pull requests

5 participants