7| <%
8| var title = page.title;
9| var description = page.description || '';
10|
Cannot call method 'substring' of null
at eval (eval at (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), :65:31)
at eval (eval at (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), :66:4294)
at /home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15
at Object.exports.render (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:293:13)
at Hexo. (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/index.js:5:14)
at Hexo.tryCatcher (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Hexo. (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/method.js:15:34)
at /home/liuxh/work/projects/blog/node_modules/hexo/lib/hexo/render.js:51:21
at tryCatcher (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromiseAtPostResolution (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:244:10)
at Async._drainQueue (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:133:10)
at Async.drainQueues (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at process._tickCallback (node.js:415:13)
`
因为我对ejs不是很了解,所以能否请您帮忙解答下。
我使用的hexo是最新的3.1.0。看到您在说明中使用的版本是2.5.7,请问是否是hexo版本变化引起的问题?
您好: 最近在使用hexo搭建自己的站点,看到您的huno主题,感觉非常漂亮。但是在自己操作的过程中,执行
hexo generate
命令抛出错误:` Unhandled rejection TypeError: /home/liuxh/work/projects/blog/themes/huno/layout/layout.ejs:7 5| 6|
Cannot call method 'substring' of null at eval (eval at (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), :65:31)
at eval (eval at (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), :66:4294)
at /home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15
at Object.exports.render (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:293:13)
at Hexo. (/home/liuxh/work/projects/blog/node_modules/hexo-renderer-ejs/index.js:5:14)
at Hexo.tryCatcher (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Hexo. (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/method.js:15:34)
at /home/liuxh/work/projects/blog/node_modules/hexo/lib/hexo/render.js:51:21
at tryCatcher (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromiseAtPostResolution (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:244:10)
at Async._drainQueue (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:133:10)
at Async.drainQueues (/home/liuxh/work/projects/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at process._tickCallback (node.js:415:13)
`
因为我对ejs不是很了解,所以能否请您帮忙解答下。
我使用的hexo是最新的3.1.0。看到您在说明中使用的版本是2.5.7,请问是否是hexo版本变化引起的问题?