hexo编辑博客报错Unhandled rejection TypeError: E:\Blog\themes\butterfly\layout\includes\layout.pug:16原因

​
ERROR:

E:\blog>hexo s
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
Unhandled rejection TypeError: E:\blog\themes\melody\layout\includes\layout.pug:11
9|
10| - var pageDescription = page.description || page.title || config.description || ''

!=partial('includes/sidebar', {}, {cache: true})



(config.keywords || []).join is not a function
at eval (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :20:44)
at template (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :1825:72)
at Theme._View.View._compiled (E:\blog\node_modules\hexo\lib\theme\view.js:123:48)
at Theme._View.View.View.render (E:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at E:\blog\node_modules\hexo\lib\hexo\index.js:365:21
at tryCatcher (E:\blog\node_modules\bluebird\js\release\util.js:16:23)
at E:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (E:\blog\node_modules\hexo\lib\hexo\router.js:123:3)
at RouteStream.Readable.read (stream_readable.js:490:10)
at resume (_stream_readable.js:975:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

Unhandled rejection TypeError: E:\blog\themes\melody\layout\includes\layout.pug:11
9|
10| - var pageDescription = page.description || page.title || config.description || ''





(config.keywords || []).join is not a function
at eval (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :20:44)
at template (eval at wrap (E:\blog\node_modules\pug-runtime\wrap.js:6:10), :1825:72)
at Theme._View.View._compiled (E:\blog\node_modules\hexo\lib\theme\view.js:123:48)
at Theme._View.View.View.render (E:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at E:\blog\node_modules\hexo\lib\hexo\index.js:365:21
at tryCatcher (E:\blog\node_modules\bluebird\js\release\util.js:16:23)
at E:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (E:\blog\node_modules\hexo\lib\hexo\router.js:123:3)
at RouteStream.Readable.read (stream_readable.js:490:10)
at resume (_stream_readable.js:975:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

​

今天搭建hexo报错了,我找了很多解决方案,但是很多都没有用,最后发现是D:\Blog\themes\butterfly\_config.yml也就是个人主题里面的配置文件_config.yml出现了问题,

也就是menu设置这一块地方,建议把这一块进行重置,可以试试修改为如下的版式

menu:
  主页: / || fas fa-home
  博文 || fa fa-graduation-cap:
    分类: /categories/ || fa fa-archive
    标签: /tags/ || fa fa-tags
    归档: /archives/ || fa fa-folder-open
  生活 || fas fa-list:
    分享: /shuoshuo/ || fa fa-comments-o
    相册: /photos/ || fa fa-camera-retro
    音乐: /music/ || fa fa-music
    影视: /movies/ || fas fa-video
  友链: /links/ || fa fa-link
  留言板: /comment/ || fa fa-paper-plane
  #留言板: /messageboard/ || fa fa-paper-plane
  关于笔者: /about/ || fas fa-heart  

或者

menu:
  首页: / || fa fa-home
  归档: /archives/ || fa fa-archive
  标签: /tags/ || fa fa-tags
  分类: /categories/ || fa fa-folder-open
  留言板: /messageboard/ || fa fa-paper-plane
  友链: /link/ || fa fa-link
  日志: /timeline/ || fa fa-bell
  菜单 || fa fa-list:
    - 关于 || /about/ || fa fa-sitemap
    - myself || /myself/ || fa fa-id-card
    - butterfly主题 || https://github.com/jerryc127/hexo-theme-butterfly/ || fa fa-heart

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

光芒再现dev

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值