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

[Feature]: 希望可以兼容一下tags为空的情况 #1501

Closed
iamxiaojianzheng opened this issue May 9, 2024 · 2 comments
Closed

[Feature]: 希望可以兼容一下tags为空的情况 #1501

iamxiaojianzheng opened this issue May 9, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@iamxiaojianzheng
Copy link

想要的功能 | What feature do you want?

我计划从next主题迁移过来,之前写的文档不是所有的都填写了tags属性。

在启用post_meta.page.tags = true && related_post.enable = true时,部署报错。

TypeError: ...\themes\butterfly\layout\post.pug:13
    11|       if (theme.post_meta.post.tags)
    12|         .post-meta__tag-list
  > 13|           each item, index in page.tags.data
    14|             a(href=url_for(item.path)).post-meta__tags #[=item.name]
    15|       include includes/third-party/share/index.pug
    16|

Cannot read properties of undefined (reading 'data')
TypeError: ...\themes\butterfly\layout\post.pug:27
    25|       include includes/pagination.pug
    26|     if theme.related_post && theme.related_post.enable
  > 27|       != related_posts(page,site.posts)
    28|
    29|     if page.comments !== false && theme.comments && theme.comments.use
    30|       - var commentsJsLoad = true

Cannot read properties of undefined (reading 'forEach')
@jerryc127 jerryc127 added the enhancement New feature or request label May 11, 2024
@jerryc127
Copy link
Owner

我就是很多写了 tags 然后没有配置内容
并不会报错

你试下跑 hexo clean && hexo g --debug
看看

@jerryc127
Copy link
Owner

06f543e

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

No branches or pull requests

2 participants