hexo错误的解决

准备正式开始用hexo写第一篇文章,打开powershell,新建了一个文件,然后用typora开始编辑新建的文件,保存,运行hexo generate,报错:

ERROR Process failed: _posts/一个奇怪的问题.md
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 4, column 1:

^
at generateError (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:165:10)
at throwError (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:171:9)
at readBlockMapping (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:1046:9)
at composeNode (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:1332:12)
at readDocument (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:1492:3)
at loadDocuments (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:1548:5)
at Object.load (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\js-yaml\lib\js-yaml\loader.js:1569:19)
at parseYAML (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\hexo-front-matter\lib\front_matter.js:80:21)
at parse (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\hexo-front-matter\lib\front_matter.js:56:12)
at Promise.all.spread (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\hexo\lib\plugins\processor\post.js:52:20)
at tryCatcher (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:509:35)
at Promise._settlePromise (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:638:18)
at PromiseArray._resolve (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise_array.js:126:19)
at PromiseArray._promiseFulfilled (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise_array.js:144:14)
at PromiseArray._iterate (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise_array.js:114:31)
at PromiseArray.init [as _init] (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise_array.js:78:10)
at Promise._settlePromise (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:566:21)
at Promise._settlePromise0 (C:\Users\BobLiaos\Desktop\hexo\bobliaos\node_modules\bluebird\js\release\promise.js:614:10)

Google之,发现说是_config.yaml格式不对,不能解析,再三检查,看所有冒号后面都有空格啊,甚至找了个原版的来替换掉,还是这个问题,百思不得我姐。

于是删掉这篇文章,运行hexo g,没问题。

又新建一篇文章,然后用typora编辑这个文件的时候,赫然发现头部填写tags的时候,字符是默认紧挨在冒号后面写的,后面少了一个空格。

解决!