[hexojs/hexo]我在两篇文章中用到了用同一个标签

2024-07-23 856 views
9

如下图所示,generate 结果是第二个用同样标签的文章会标签会自动消失。 default

回答

9
ERROR Process failed: _posts/General-cantor-set.md
Error: Tag `Fractals` has already existed!
    at F:\mathen\node_modules\hexo\lib\models\tag.js:57:13
    at tryCatcher (F:\mathen\node_modules\hexo\node_modules\bluebird\js\main\uti
l.js:26:23)
    at F:\mathen\node_modules\hexo\node_modules\bluebird\js\main\method.js:15:34

    at F:\mathen\node_modules\hexo\node_modules\warehouse\lib\model.js:193:12
    at tryCatcher (F:\mathen\node_modules\hexo\node_modules\bluebird\js\main\uti
l.js:26:23)
    at ReductionPromiseArray._promiseFulfilled (F:\mathen\node_modules\hexo\node
_modules\bluebird\js\main\reduce.js:105:38)
    at ReductionPromiseArray.init [as _init$] (F:\mathen\node_modules\hexo\node_
modules\bluebird\js\main\promise_array.js:92:18)
    at ReductionPromiseArray.init (F:\mathen\node_modules\hexo\node_modules\blue
bird\js\main\reduce.js:42:10)
    at Async._drainQueue (F:\mathen\node_modules\hexo\node_modules\bluebird\js\m
ain\async.js:128:12)
    at Async._drainQueues (F:\mathen\node_modules\hexo\node_modules\bluebird\js\
main\async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (F:\mathen\node_modules\hex
o\node_modules\bluebird\js\main\async.js:15:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)
5

标签肯定是允许多个文章使用的,可能是你的格式有问题?

tags: [Software, C]

2

我的用法是

tags: 
- tag 1
- tag 2
6

我在另一个hexo博客这么用就没有问题。

8

我回去测试之后,感觉问题应该是你的Tags名写重复了,建议你检查一下。。

5

难道不同文章不能用一个tag吗?

6

不是不同文章,是你的_posts/General-cantor-set.md中有两个一样的Tag。 刚才我写了一个

tags: 
- tag 1
- tag 1

然后就出现了一模一样的错误。

9
title: Sums of General Cantor Sets
date: 2015-01-04 20:37:28
tags: 
- [[Fractals]]
- [[Cantor set]]
categories: 
- Math.MG

并没有,而且我的报错文件很多,都是用了Fractals这个标签的

8
tags: 
- [[Fractals]]
- [[Cantor set]]

改成

tags: 
- Fractals
- Cantor set
1

谢谢!解决了。

btw, 我记得Hexo文本有说过分开的字符需要加两个中括号?

4

对了有个建议就是 英文的Tags可以忽略掉大小写吗?有时候Tag的时候会不注意,但是会生成两个标签。

6
  1. 不是中括号,应该是加上引号或者是两个大括号。
  2. 其实这是修复BUG之后的结果,原来的版本是不区分的,结果文章中是大写,但是Tags链接是小写,导致了很多页面丢失。建议还是注意下细节吧~
3

好吧,我好像和另外一个语言弄混了。熬夜把脑子熬晕了。。。

你说得也对,可能是我之前就没太注意。

再次感谢~

4

不用谢~