When I run hexo generate, I get the following error:
ERROR { err:
{ TypeError: /home/pi/test/themes/cactus/layout/layout.ejs:2
1| <!DOCTYPE html>
>> 2| <html<%= config.language ? " lang=" + config.language.substring(0, 2) : ""%>>
3| <%- partial('_partial/head') %>
4| <body class="max-width mx-auto px3 <%- theme.direction -%>">
5| <% if (is_post()) { %>
config.language.substring is not a function
at eval (/home/pi/test/themes/cactus/layout/layout.ejs:12:71)
at layout (/home/pi/test/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled.locals [as _compiled] (/home/pi/test/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/home/pi/test/node_modules/hexo/lib/theme/view.js:39:17)
at _compiled.then.result (/home/pi/test/node_modules/hexo/lib/theme/view.js:51:25)
at tryCatcher (/home/pi/test/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/pi/test/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/pi/test/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/pi/test/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/pi/test/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/pi/test/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/pi/test/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/pi/test/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/test/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5) path: '/home/pi/test/themes/cactus/layout/layout.ejs' } } 'Render HTML failed: 2021/01/23/hello-world/index.html'
I tried setting multiple languages for the blog in the way recommended by official Hexo documentation.
In
/_config.yml
When I run
hexo generate
, I get the following error:Package versions:
Attached please see the full output of
hexo generate
: output.txt