Hexo升级到2.8

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

转载自夜明的孤行灯

本文链接地址: https://www.huangyunkun.com/2014/07/31/hexo-update-error-with-yaml-parser/

Hexo使用的Yaml Parser做出了一定的修改,所以很有可能在升级Hexo以后会出现HexoError错误。

[error] { name:'HexoError',
reason:'incomplete explicit mapping pair; a key node is missed',
mark:
{ name:null,
buffer:'categories: Categoriesnsearch: Searchntags: Tagsntagcloud: Tag Cloudnprev: Prevnnext: Nextncomment: Commentsncontents: Contentsnarchive_a: Archivesnarchive_b: Archives: %snpage: Page %dnrecent_posts: Recent Postsnmenu: Menunlinks: Linksnrss: RSSnshowsidebar: Show Sidebarnhidesidebar: Hide Sidebarnupdated: Updatednnextpost: NEXTnprevpost: PREVnu0000',
position:167,
line:9,
column:19 },
message:'Process failed: languages/default.yml',
domain:
{ domain:null,
_events: { error: [Function] },
_maxListeners:10,
members: [ [Object] ] },
domainThrown:true,
stack:undefined }

具体的修改很简单,用引号包裹字符串就行了,比如

archive_b: Archives: %s => archive_b:"Archives: %s"

具体需要修改的还有

文件

只需要关心languages/default.yml,其他的不需要修改。

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

转载自夜明的孤行灯

本文链接地址: https://www.huangyunkun.com/2014/07/31/hexo-update-error-with-yaml-parser/

发表评论