Hexo next主题 languages/zh-Hans.yml报错
当站点配置文件改为language: en或者language: zh-Hans时,都会报错,
ERROR Process failed: languages/zh-Hans.yml
Error
at generateError (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:162:10)
at throwError (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:168:9)
at storeMappingPair (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:307:7)
at readBlockMapping (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1070:9)
at composeNode (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1331:12)
at readBlockMapping (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1061:11)
at composeNode (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1331:12)
at readDocument (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1493:3)
at loadDocuments (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1549:5)
at Object.load (/Users/Documents/hexo/node_modules/js-yaml/lib/js-yaml/loader.js:1566:19)
at Hexo.yamlHelper (/Users/Documents/hexo/node_modules/hexo/lib/plugins/renderer/yaml.js:7:15)
at Hexo.tryCatcher (/Users/Documents/hexo/node_modules/bluebird/js/release/util.js:16:23)
at Hexo.<anonymous> (/Users/Documents/hexo/node_modules/bluebird/js/release/method.js:15:34)
at /Users/Documents/hexo/node_modules/hexo/lib/hexo/render.js:61:21
at tryCatcher (/Users/Documents/hexo/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/Documents/hexo/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/Users/Documents/hexo/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/Users/Documents/hexo/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/Users/Documents/hexo/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/Users/Documents/hexo/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/Users/Documents/hexo/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/Users/Documents/hexo/node_modules/bluebird/js/release/async.js:17:14)
如果把languages文件夹中zh-Hans.yml文件删除,则不会报错,已经尝试过从github上重新下载NEXT主题中的zh-Hans.yml的文件进行替换,但是依然报错,求问这是什么情况?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
遇到了同样的问题. 不知道怎么解决
找到问题了,是因为 _config.yml 文件问题缺少了配置. 里面menu配置将#号打开
删除掉themes/next/language中 zh-Hans.yml 里面的其他内容, 剩下这些就不会报错.