当配置玩_config.yml文件时,执行hexo g -d时出现错误如下:
$ hexo g -d FATAL can not read a block mapping entry; a multiline key may not be an implicit key at line 84, column 1: ^ YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 84, column 1: ^ at generateError (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:165:10) at throwError (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:171:9) at readBlockMapping (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:1046:9) at composeNode (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:1332:12) at readDocument (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:1492:3) at loadDocuments (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:1548:5) at Object.load (E:worklearnlog ode_modulesjs-yamllibjs-yamlloader.js:1569:19) at Hexo.yamlHelper (E:worklearnlog ode_moduleshexolibplugins endereryaml.js:7:15) at Hexo.tryCatcher (E:worklearnlog ode_modulesluebirdjs eleaseutil.js:16:23) at Hexo.<anonymous> (E:worklearnlog ode_modulesluebirdjs eleasemethod.js:15:34) at Promise.then.text (E:worklearnlog ode_moduleshexolibhexo ender.js:61:21) at tryCatcher (E:worklearnlog ode_modulesluebirdjs eleaseutil.js:16:23) at Promise._settlePromiseFromHandler (E:worklearnlog ode_modulesluebirdjs eleasepromise.js:512:31) at Promise._settlePromise (E:worklearnlog ode_modulesluebirdjs eleasepromise.js:569:18) at Promise._settlePromise0 (E:worklearnlog ode_modulesluebirdjs eleasepromise.js:614:10) at Promise._settlePromises (E:worklearnlog ode_modulesluebirdjs eleasepromise.js:694:18) at _drainQueueStep (E:worklearnlog ode_modulesluebirdjs eleaseasync.js:138:12) at _drainQueue (E:worklearnlog ode_modulesluebirdjs eleaseasync.js:131:9) at Async._drainQueues (E:worklearnlog ode_modulesluebirdjs eleaseasync.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (E:worklearnlog ode_modulesluebirdjs eleaseasync.js:17:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5)
原因在于:
//wrong deploy: type:git repo:git@github.com:xxx/xxx.github.io.git branch:master //wrong,需要缩进格式无空格 deploy: type:git repo:git@github.com:xxx/xxx.github.io.git branch:master //right,需要缩进格式加空格 deploy: type: git repo: git@github.com:xxx/xxx.github.io.git branch: master
这样才是正确的配置写法。