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

item.categories.sort is not a function #41

Open
Awhisper opened this issue May 27, 2018 · 1 comment
Open

item.categories.sort is not a function #41

Awhisper opened this issue May 27, 2018 · 1 comment

Comments

@Awhisper
Copy link

TypeError: /Users/Awhisper/Desktop/Hexo/themes/anatole/layout/mixins.pug:24
22| if item.tags
23| i.fa.fa-tag

24| - item.categories.sort('posts').each(function(item) {
25| a.tag(href=config.root + item.path, title= item.name)= item.name + " "
26| - });
27| - item.tags.sort('posts').each(function(item) {

item.categories.sort is not a function
at Object.pug_interp [as make_post] (eval at wrap (/Users/Awhisper/Desktop/Hexo/node_modules/pug-runtime/wrap.js:6:10), :314:17)
at eval (eval at wrap (/Users/Awhisper/Desktop/Hexo/node_modules/pug-runtime/wrap.js:6:10), :429:24)
at template (eval at wrap (/Users/Awhisper/Desktop/Hexo/node_modules/pug-runtime/wrap.js:6:10), :806:183)
at Theme._View.View._compiled.locals [as _compiled] (/Users/Awhisper/Desktop/Hexo/node_modules/hexo/lib/theme/view.js:124:48)
at Theme._View.View.View.render (/Users/Awhisper/Desktop/Hexo/node_modules/hexo/lib/theme/view.js:29:15)
at route.set (/Users/Awhisper/Desktop/Hexo/node_modules/hexo/lib/hexo/index.js:386:29)
at tryCatcher (/Users/Awhisper/Desktop/Hexo/node_modules/bluebird/js/release/util.js:16:23)
at /Users/Awhisper/Desktop/Hexo/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/Awhisper/Desktop/Hexo/node_modules/hexo/lib/hexo/router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:442:10)
at resume
(_stream_readable.js:822:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

您好,hexo g 的时候,我遇到了这个错误,注释掉pug文件中的 tag 与 category可以正常使用,但是文章的标签无法正确显示,

我的版本是 node 8.11.1 用的anatole是稳定版,

奇怪的是几周前是正常的,没遇到类似的问题,因此我个人主页线上是正常的,只是现在冲新hexo g 的时候,无法正常生成了

@lockerdown
Copy link

+1

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

No branches or pull requests

2 participants