Hexo+Github博客:hexo g 时, Cannot read property 'replace' of null

@Author:CSU张扬
@Email:[email protected] or [email protected]
@我的网站: https://www.faker.top

报错信息

关键信息:

ERROR Render HTML failed: index.html
TypeError: Cannot read property 'replace' of null
完整信息:
ERROR Render HTML failed: index.html
TypeError: Cannot read property 'replace' of null
    at Hexo.externalLinkFilter (F:\Program Files\hexo\node_modules\hexo\lib\plugins\filter\after_render\external_link.js:45:15)
    at Hexo.tryCatcher (F:\Program Files\hexo\node_modules\bluebird\js\release\util.js:16:23)
    at Hexo.<anonymous> (F:\Program Files\hexo\node_modules\bluebird\js\release\method.js:15:34)
    at F:\Program Files\hexo\node_modules\hexo\lib\extend\filter.js:60:50
    at tryCatcher (F:\Program Files\hexo\node_modules\bluebird\js\release\util.js:16:23)
    at Object.gotValue (F:\Program Files\hexo\node_modules\bluebird\js\release\reduce.js:166:18)
    at Object.gotAccum (F:\Program Files\hexo\node_modules\bluebird\js\release\reduce.js:155:25)
    at Object.tryCatcher (F:\Program Files\hexo\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (F:\Program Files\hexo\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (F:\Program Files\hexo\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromiseCtx (F:\Program Files\hexo\node_modules\bluebird\js\release\promise.js:641:10)
    at _drainQueueStep (F:\Program Files\hexo\node_modules\bluebird\js\release\async.js:97:12)
    at _drainQueue (F:\Program Files\hexo\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (F:\Program Files\hexo\node_modules\bluebird\js\release\async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (F:\Program Files\hexo\node_modules\bluebird\js\release\async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

解决办法

检查最近的一篇文章,开头的 Front-matter (文件最上方以 — 分隔的区域,用于指定个别文件的变量)格式是否正确。

  1. 可以检查单词的拼写,空格,中英文冒号等等。
  2. 文章标题 title: 是否有特殊字符。例如 % ,我们必须使用转义字符 % 代替它,否则就会报该错误。

你可能感兴趣的:(Hexo)