yscoder/hexo-theme-indigo

hexo g 生成失败, Render HTML failed

opfanswyx opened this issue · 22 comments

我的运行环境是ubuntu云服务器,把public目录托管给nginx服务器

root@VM-0-6-ubuntu:~/hexo# hexo -v
INFO  Validating config
hexo: 5.2.0
hexo-cli: 4.2.0
os: Linux 4.15.0-88-generic linux x64
node: 12.18.0
v8: 7.8.279.23-node.37
uv: 1.37.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 72
nghttp2: 1.41.0
napi: 6
llhttp: 2.0.4
http_parser: 2.9.3
openssl: 1.1.1g
cldr: 37.0
icu: 67.1
tz: 2019c
unicode: 13.0
root@VM-0-6-ubuntu:~/hexo# node -v
v12.18.0
root@VM-0-6-ubuntu:~/hexo# npm -v
6.14.4
root@VM-0-6-ubuntu:~/hexo# 

切换为默认主题,next主题都能正常生成,indigo无法生成,报错如下:

root@VM-0-6-ubuntu:~/hexo# hexo g
INFO  Validating config
INFO  Start processing
INFO  Files loaded in 260 ms
ERROR ReferenceError: /root/hexo/themes/indigo/layout/categories.ejs:1
 >> 1| <%- partial('_partial/header', {
    2|     title: locals.title || theme.categories_title,
    3|     hdClass: 'categories-header'
    4| }) %>

/root/hexo/themes/indigo/layout/_partial/header.ejs:40
    38|     </div>
    39| 
 >> 40|     <%- partial('tags-bar', {
    41|         type: hdClass.split('-')[0]
    42|     }) %>
    43| 

/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:7
    5|         <a href="<%= url_for('/' + type) %>" style="-webkit-order:-1;order:-1" class="tags-list-item waves-effect waves-button waves-light
    6|             <% if(path === type + '/index.html'){%> active<%}%>"><%= __('tag.all') %></a>
 >> 7|         <%
    8|             var options = [];
    9| 
    10|             (type === 'tags' ? site.tags : site.categories).each(function(o) {

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:32:25)
    at tags-bar (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/_partial/header.ejs:55:17)
    at header (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/categories.ejs:8:17)
    at categories (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/root/hexo/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (_stream_readable.js:468:10)
    at resume_ (_stream_readable.js:982:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  path: '/root/hexo/themes/indigo/layout/categories.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/tags.ejs:1
 >> 1| <%- partial('_partial/header', {
    2|     title: locals.title || theme.tags_title,
    3|     hdClass: 'tags-header'
    4| }) %>

/root/hexo/themes/indigo/layout/_partial/header.ejs:40
    38|     </div>
    39| 
 >> 40|     <%- partial('tags-bar', {
    41|         type: hdClass.split('-')[0]
    42|     }) %>
    43| 

/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:7
    5|         <a href="<%= url_for('/' + type) %>" style="-webkit-order:-1;order:-1" class="tags-list-item waves-effect waves-button waves-light
    6|             <% if(path === type + '/index.html'){%> active<%}%>"><%= __('tag.all') %></a>
 >> 7|         <%
    8|             var options = [];
    9| 
    10|             (type === 'tags' ? site.tags : site.categories).each(function(o) {

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:32:25)
    at tags-bar (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/_partial/header.ejs:55:17)
    at header (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/tags.ejs:8:17)
    at tags (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/root/hexo/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (_stream_readable.js:468:10)
    at resume_ (_stream_readable.js:982:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  path: '/root/hexo/themes/indigo/layout/tags.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/archive.ejs:6
    4| }) %>
    5| <div class="container body-wrap fade">
 >> 6|     <%
    7|         var posts = [];
    8| 
    9|         page.posts.each(function(post){

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/archive.ejs:22:25)
    at archive (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/root/hexo/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (_stream_readable.js:468:10)
    at resume_ (_stream_readable.js:982:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  path: '/root/hexo/themes/indigo/layout/archive.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/archive.ejs:6
    4| }) %>
    5| <div class="container body-wrap fade">
 >> 6|     <%
    7|         var posts = [];
    8| 
    9|         page.posts.each(function(post){

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/archive.ejs:22:25)
    at archive (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/root/hexo/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (_stream_readable.js:468:10)
    at resume_ (_stream_readable.js:982:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  path: '/root/hexo/themes/indigo/layout/archive.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/archive.ejs:6
    4| }) %>
    5| <div class="container body-wrap fade">
 >> 6|     <%
    7|         var posts = [];
    8| 
    9|         page.posts.each(function(post){

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/archive.ejs:22:25)
    at archive (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/root/hexo/node_modules/hexo/lib/hexo/router.js:47:5)
    at RouteStream.Readable.read (_stream_readable.js:468:10)
    at resume_ (_stream_readable.js:982:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  path: '/root/hexo/themes/indigo/layout/archive.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/category.ejs:1
 >> 1| <%- partial('categories', {
    2|     title: theme.categories_title + ': ' + page.category
    3| }) %>
    4| 

/root/hexo/themes/indigo/layout/categories.ejs:1
 >> 1| <%- partial('_partial/header', {
    2|     title: locals.title || theme.categories_title,
    3|     hdClass: 'categories-header'
    4| }) %>

/root/hexo/themes/indigo/layout/_partial/header.ejs:40
    38|     </div>
    39| 
 >> 40|     <%- partial('tags-bar', {
    41|         type: hdClass.split('-')[0]
    42|     }) %>
    43| 

/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:7
    5|         <a href="<%= url_for('/' + type) %>" style="-webkit-order:-1;order:-1" class="tags-list-item waves-effect waves-button waves-light
    6|             <% if(path === type + '/index.html'){%> active<%}%>"><%= __('tag.all') %></a>
 >> 7|         <%
    8|             var options = [];
    9| 
    10|             (type === 'tags' ? site.tags : site.categories).each(function(o) {

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:32:25)
    at tags-bar (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/_partial/header.ejs:55:17)
    at header (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/categories.ejs:8:17)
    at categories (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/category.ejs:8:17)
    at category (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34 {
  path: '/root/hexo/themes/indigo/layout/category.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/tag.ejs:1
 >> 1| <%- partial('tags', {
    2|     title: theme.tags_title + ': '+ page.tag
    3| }) %>
    4| 

/root/hexo/themes/indigo/layout/tags.ejs:1
 >> 1| <%- partial('_partial/header', {
    2|     title: locals.title || theme.tags_title,
    3|     hdClass: 'tags-header'
    4| }) %>

/root/hexo/themes/indigo/layout/_partial/header.ejs:40
    38|     </div>
    39| 
 >> 40|     <%- partial('tags-bar', {
    41|         type: hdClass.split('-')[0]
    42|     }) %>
    43| 

/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:7
    5|         <a href="<%= url_for('/' + type) %>" style="-webkit-order:-1;order:-1" class="tags-list-item waves-effect waves-button waves-light
    6|             <% if(path === type + '/index.html'){%> active<%}%>"><%= __('tag.all') %></a>
 >> 7|         <%
    8|             var options = [];
    9| 
    10|             (type === 'tags' ? site.tags : site.categories).each(function(o) {

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/_partial/tags-bar.ejs:32:25)
    at tags-bar (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/_partial/header.ejs:55:17)
    at header (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/tags.ejs:8:17)
    at tags (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/tag.ejs:8:17)
    at tag (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/hexo/index.js:64:21
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /root/hexo/node_modules/bluebird/js/release/method.js:15:34 {
  path: '/root/hexo/themes/indigo/layout/tag.ejs'
}
ERROR {
  err: ReferenceError: /root/hexo/themes/indigo/layout/layout.ejs:3
      1| <!DOCTYPE html>
      2| <html>
   >> 3| <%- partial('_partial/head') %>
      4| <body>
      5|     <%- partial('_partial/loading') %>
      6|     <%- partial('_partial/menu') %>
  
  /root/hexo/themes/indigo/layout/_partial/head.ejs:37
      35|     <meta name="theme-color" content="<%=theme.color%>">
      36|     <% } %>
   >> 37|     <%
      38|         var keyWords = config.keywords;
      39|         if(page.tags){
      40|         keyWords = [];
  
  _ is not defined
      at eval (/root/hexo/themes/indigo/layout/_partial/head.ejs:91:9)
      at head (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
      at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
      at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
      at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
      at eval (/root/hexo/themes/indigo/layout/layout.ejs:10:17)
      at layout (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
      at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
      at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
      at /root/hexo/node_modules/hexo/lib/theme/view.js:51:25
      at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/root/hexo/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/root/hexo/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/root/hexo/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/root/hexo/node_modules/bluebird/js/release/promise.js:729:18)
      at _drainQueueStep (/root/hexo/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/root/hexo/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/root/hexo/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/root/hexo/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:456:21) {
    path: '/root/hexo/themes/indigo/layout/layout.ejs'
  }
} Render HTML failed: 2020/10/02/hello/index.html
ERROR {
  err: ReferenceError: /root/hexo/themes/indigo/layout/layout.ejs:6
      4| <body>
      5|     <%- partial('_partial/loading') %>
   >> 6|     <%- partial('_partial/menu') %>
      7|     <main id="main">
      8|         <%- body %>
      9|         <%- partial('_partial/footer') %>
  
  /root/hexo/themes/indigo/layout/_partial/menu.ejs:27
      25|             menuItem = theme.menu[i];
      26|           %>
   >> 27|             <li class="waves-block waves-effect<% if(isActive(menuItem)){ %> active<% } %>">
      28|               <a href="<%- url_for(menuItem.url) %>" <% if(menuItem.target){ %>target="_blank"<% } %> >
      29|                 <i class="icon icon-lg icon-<%= i %>"></i>
      30|                 <%=(menuItem.text || _.startCase(i)) %>
  
  _ is not defined
      at isActive (/root/hexo/themes/indigo/layout/_partial/menu.ejs:32:88)
      at eval (/root/hexo/themes/indigo/layout/_partial/menu.ejs:40:11)
      at menu (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
      at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
      at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
      at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
      at eval (/root/hexo/themes/indigo/layout/layout.ejs:16:17)
      at layout (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
      at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
      at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
      at /root/hexo/node_modules/hexo/lib/theme/view.js:51:25
      at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/root/hexo/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/root/hexo/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/root/hexo/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/root/hexo/node_modules/bluebird/js/release/promise.js:729:18)
      at _drainQueueStep (/root/hexo/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/root/hexo/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/root/hexo/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/root/hexo/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:456:21) {
    path: '/root/hexo/themes/indigo/layout/layout.ejs'
  }
} Render HTML failed: index.html
ERROR ReferenceError: /root/hexo/themes/indigo/layout/layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3| <%- partial('_partial/head') %>
    4| <body>
    5|     <%- partial('_partial/loading') %>
    6|     <%- partial('_partial/menu') %>

/root/hexo/themes/indigo/layout/_partial/head.ejs:37
    35|     <meta name="theme-color" content="<%=theme.color%>">
    36|     <% } %>
 >> 37|     <%
    38|         var keyWords = config.keywords;
    39|         if(page.tags){
    40|         keyWords = [];

_ is not defined
    at eval (/root/hexo/themes/indigo/layout/_partial/head.ejs:91:9)
    at head (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/layout.ejs:10:17)
    at layout (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/theme/view.js:51:25
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/root/hexo/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/root/hexo/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/root/hexo/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/root/hexo/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/root/hexo/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/root/hexo/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/root/hexo/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/root/hexo/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21) {
  path: '/root/hexo/themes/indigo/layout/layout.ejs'
}
ERROR ReferenceError: /root/hexo/themes/indigo/layout/layout.ejs:6
    4| <body>
    5|     <%- partial('_partial/loading') %>
 >> 6|     <%- partial('_partial/menu') %>
    7|     <main id="main">
    8|         <%- body %>
    9|         <%- partial('_partial/footer') %>

/root/hexo/themes/indigo/layout/_partial/menu.ejs:27
    25|             menuItem = theme.menu[i];
    26|           %>
 >> 27|             <li class="waves-block waves-effect<% if(isActive(menuItem)){ %> active<% } %>">
    28|               <a href="<%- url_for(menuItem.url) %>" <% if(menuItem.target){ %>target="_blank"<% } %> >
    29|                 <i class="icon icon-lg icon-<%= i %>"></i>
    30|                 <%=(menuItem.text || _.startCase(i)) %>

_ is not defined
    at isActive (/root/hexo/themes/indigo/layout/_partial/menu.ejs:32:88)
    at eval (/root/hexo/themes/indigo/layout/_partial/menu.ejs:40:11)
    at menu (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/root/hexo/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/root/hexo/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/root/hexo/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/root/hexo/themes/indigo/layout/layout.ejs:16:17)
    at layout (/root/hexo/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/root/hexo/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/root/hexo/node_modules/hexo/lib/theme/view.js:39:17)
    at /root/hexo/node_modules/hexo/lib/theme/view.js:51:25
    at tryCatcher (/root/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/root/hexo/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/root/hexo/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/root/hexo/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/root/hexo/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/root/hexo/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/root/hexo/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/root/hexo/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/root/hexo/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:456:21) {
  path: '/root/hexo/themes/indigo/layout/layout.ejs'
}
INFO  Generated: categories/index.html
INFO  Generated: tags/index.html
INFO  Generated: archives/index.html
INFO  Generated: archives/2020/index.html
INFO  Generated: archives/2020/10/index.html
INFO  Generated: categories/other/index.html
INFO  Generated: tags/other/index.html
INFO  Generated: atom.xml
INFO  Generated: content.json
INFO  Generated: index.html
INFO  Generated: img/alipay.jpg
INFO  Generated: img/avatar.jpg
INFO  Generated: img/cc.png
INFO  Generated: img/img-err.png
INFO  Generated: img/img-loading.png
INFO  Generated: img/wechat.jpg
INFO  Generated: js/main.min.js
INFO  Generated: img/brand.jpg
INFO  Generated: js/search.js
INFO  Generated: js/search.min.js
INFO  Generated: 2020/10/02/hello/index.html
INFO  Generated: css/fonts/roboto/Roboto-Bold.eot
INFO  Generated: js/main.js
INFO  Generated: css/fonts/fontawesome/fontawesome-webfont.woff2
INFO  Generated: css/fonts/roboto/Roboto-Bold.woff
INFO  Generated: css/fonts/roboto/Roboto-Light.eot
INFO  Generated: css/fonts/roboto/Roboto-Medium.eot
INFO  Generated: css/fonts/roboto/Roboto-Regular.eot
INFO  Generated: css/fonts/roboto/Roboto-Thin.eot
INFO  Generated: css/fonts/roboto/Roboto-Bold.woff2
INFO  Generated: css/fonts/roboto/Roboto-Thin.woff2
INFO  Generated: css/fonts/roboto/Roboto-Bold.ttf
INFO  Generated: css/fonts/roboto/Roboto-Light.woff
INFO  Generated: css/fonts/roboto/Roboto-Light.woff2
INFO  Generated: css/fonts/roboto/Roboto-Medium.woff
INFO  Generated: css/fonts/roboto/Roboto-Medium.woff2
INFO  Generated: css/fonts/roboto/Roboto-Regular.woff
INFO  Generated: css/fonts/roboto/Roboto-Regular.woff2
INFO  Generated: css/fonts/roboto/Roboto-Thin.woff
INFO  Generated: css/fonts/fontawesome/FontAwesome.otf
INFO  Generated: css/fonts/roboto/Roboto-Light.ttf
INFO  Generated: css/fonts/roboto/Roboto-Medium.ttf
INFO  Generated: css/fonts/roboto/Roboto-Regular.ttf
INFO  Generated: css/fonts/roboto/Roboto-Thin.ttf
INFO  Generated: css/fonts/fontawesome/fontawesome-webfont.woff
INFO  Generated: css/fonts/fontawesome/fontawesome-webfont.ttf
INFO  Generated: css/style.css
INFO  Generated: css/fonts/fontawesome/fontawesome-webfont.eot
INFO  Generated: css/fonts/fontawesome/fontawesome-webfont.svg
INFO  49 files generated in 1.06 s

同样的问题,windows 10环境

hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。

和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在node_modules里面,可能是在较新的依赖环境里存在不兼容的问题了,“_ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。

如果你也需要node_modules,请联系我。

hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。

和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在node_modules里面,可能是在较新的依赖环境里存在不兼容的问题了,“_ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。

如果你也需要node_modules,请联系我。

@opfanswyx 非常感谢,我也发现了是这个的问题,但不懂前端,那你方便的话能否发到jameshoi@foxmail.com这个邮箱呢

hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。
和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在node_modules里面,可能是在较新的依赖环境里存在不兼容的问题了,“_ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。
如果你也需要node_modules,请联系我。

我也出现了同样的问题,能否分享你的 node_modules 到 brucehan1998@outlook.com ,十分感谢!

我使用@opfanswyx的node_modules还是无法生成

参照 hexojs/hexo#3753
Global Variables_已被移除(

参照 hexojs/hexo#3753
Global Variables_已被移除(

根据你的思路,我找到hexo的提交历史
参照提交历史,修改以下文件并执行命令即可修复

  1. 在博客目录下执行 npm install lodash
  2. 在[BlogPath]/node_modules/hexo/package.json 中加上"lodash": "4.17.20"
    添加后的文件如下:

    "_phantomChildren": {
    "abbrev": "1.1.1",
    "bluebird": "3.7.2",
    "chalk": "4.1.0",
    "command-exists": "1.2.9",
    "hexo-fs": "3.1.0",
    "hexo-log": "2.0.0",
    "hexo-util": "2.4.0",
    "minimist": "1.2.5",
    "resolve": "1.18.1",
    "tildify": "2.0.0",
    "lodash": "4.17.20"
    },
  3. 在[BlogPath]/node_modules/hexo/lib/hexo/index.js 加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('chalk');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
const { runInThisContext } = require('vm');
const { version } = require('../../package.json');
const logger = require('hexo-log');
const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend');
const Render = require('./render');
const registerModels = require('./register_models');
const Post = require('./post');
const Scaffold = require('./scaffold');
const Source = require('./source');
const Router = require('./router');
const Theme = require('../theme');
const Locals = require('./locals');
const defaultConfig = require('./default_config');
const loadDatabase = require('./load_database');
const multiConfigPath = require('./multi_config_path');
const { sync } = require('resolve');
const { deepMerge, full_url_for } = require('hexo-util');
const _ = require('lodash');

class Locals {
constructor(path, locals) {
this.page = { ...locals };
if (this.page.path == null) this.page.path = path;
this.path = path;
this.url = full_url_for.call(ctx, path);
this.config = config;
this.theme = theme.config;
this.layout = 'layout';
this.env = env;
this._ = _;
this.view_dir = join(theme_dir, 'layout') + sep;
this.site = localsObj;
}

参照hexojs / HEXO#3753
Global Variables_已被移除移除(

根据你的思路,我找到hexo的提交历史参照
提交历史,修改以下文件并执行命令即可恢复

  1. 在博客目录下执行npm install lodash
  2. 在[BlogPath] /node_modules/hexo/package.json中"lodash": "4.17.20"
    添加添加后的文件如下:

    “ _phantomChildren”:{
    “ abbrev”:“ 1.1.1”,
    “ bluebird”:“ 3.7.2”,
    “ chalk” :“ 4.1.0”,
    “ command-exists”:“ 1.2.9”,
    “ hexo-fs”:“ 3.1.0”,
    “ hexo-log”:“ 2.0.0”,
    “ hexo-util”:“ 2.4.0“,
    ” minimist“:” 1.2.5“,
    ” resolve“:” 1.18.1“,
    ” tildify“:” 2.0.0“,
    ” lodash“:” 4.17.20“
    },
  3. 在[BlogPath] /node_modules/hexo/lib/hexo/index.js加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const {sep,join,dirname} = require('path');
const tildify = require('tildify');
const数据库= require('仓库');
const {洋红色,下划线} = require('chalk');
const {EventEmitter} = require('events');
const {readFile} = require('hexo-fs');
const Module = require('module');
const {runInThisContext} = require('vm');
const {version} = require('../../ package.json');
const logger = require('hexo-log');
const {Console,Deployer,Filter,Generator,Helper,Injector,Migrator,Processor,Renderer,Tag} = require('../ extend');
const Render = require('。/ render');
const registerModels = require('./ register_models');
const Post = require('./ post');
const Scaffold = require('./ scaffold');
const Source = require('./ source');
const Router = require('./ router');
const Theme = require('../ theme');
const Locals = require('./ locals');
const defaultConfig = require('./ default_config');
const loadDatabase = require('./ load_database');
const multiConfigPath = require('./ multi_config_path');
const {sync} = require('resolve');
const {deepMerge,full_url_for} = require('hexo-util');
const _ = require('lodash');

类Locals {
构造函数(路径,locals){
this.page = {... locals};
如果(this.page.path == null)this.page.path =路径;
this.path =路径;
this.url = full_url_for.call(ctx,path);
this.config =配置;
this.theme = theme.config;
this.layout ='layout';
this.env = env;
_ = _;
this.view_dir = join(theme_dir,'layout')+ sep;
this.site = localsObj;
}

完美的解决了问题

参照 hexojs/hexo#3753
Global Variables_已被移除(

根据你的思路,我找到hexo的提交历史
参照提交历史,修改以下文件并执行命令即可修复

  1. 在博客目录下执行 npm install lodash
  2. 在[BlogPath]/node_modules/hexo/package.json 中加上"lodash": "4.17.20"
    添加后的文件如下:

    "_phantomChildren": {
    "abbrev": "1.1.1",
    "bluebird": "3.7.2",
    "chalk": "4.1.0",
    "command-exists": "1.2.9",
    "hexo-fs": "3.1.0",
    "hexo-log": "2.0.0",
    "hexo-util": "2.4.0",
    "minimist": "1.2.5",
    "resolve": "1.18.1",
    "tildify": "2.0.0",
    "lodash": "4.17.20"
    },
  3. 在[BlogPath]/node_modules/hexo/lib/hexo/index.js 加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('chalk');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
const { runInThisContext } = require('vm');
const { version } = require('../../package.json');
const logger = require('hexo-log');
const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend');
const Render = require('./render');
const registerModels = require('./register_models');
const Post = require('./post');
const Scaffold = require('./scaffold');
const Source = require('./source');
const Router = require('./router');
const Theme = require('../theme');
const Locals = require('./locals');
const defaultConfig = require('./default_config');
const loadDatabase = require('./load_database');
const multiConfigPath = require('./multi_config_path');
const { sync } = require('resolve');
const { deepMerge, full_url_for } = require('hexo-util');
const _ = require('lodash');

class Locals {
constructor(path, locals) {
this.page = { ...locals };
if (this.page.path == null) this.page.path = path;
this.path = path;
this.url = full_url_for.call(ctx, path);
this.config = config;
this.theme = theme.config;
this.layout = 'layout';
this.env = env;
this._ = _;
this.view_dir = join(theme_dir, 'layout') + sep;
this.site = localsObj;
}

完美!

参照 hexojs/hexo#3753
Global Variables_已被移除(

根据你的思路,我找到hexo的提交历史
参照提交历史,修改以下文件并执行命令即可修复

  1. 在博客目录下执行 npm install lodash
  2. 在[BlogPath]/node_modules/hexo/package.json 中加上"lodash": "4.17.20"
    添加后的文件如下:

    "_phantomChildren": {
    "abbrev": "1.1.1",
    "bluebird": "3.7.2",
    "chalk": "4.1.0",
    "command-exists": "1.2.9",
    "hexo-fs": "3.1.0",
    "hexo-log": "2.0.0",
    "hexo-util": "2.4.0",
    "minimist": "1.2.5",
    "resolve": "1.18.1",
    "tildify": "2.0.0",
    "lodash": "4.17.20"
    },
  3. 在[BlogPath]/node_modules/hexo/lib/hexo/index.js 加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('chalk');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
const { runInThisContext } = require('vm');
const { version } = require('../../package.json');
const logger = require('hexo-log');
const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend');
const Render = require('./render');
const registerModels = require('./register_models');
const Post = require('./post');
const Scaffold = require('./scaffold');
const Source = require('./source');
const Router = require('./router');
const Theme = require('../theme');
const Locals = require('./locals');
const defaultConfig = require('./default_config');
const loadDatabase = require('./load_database');
const multiConfigPath = require('./multi_config_path');
const { sync } = require('resolve');
const { deepMerge, full_url_for } = require('hexo-util');
const _ = require('lodash');

class Locals {
constructor(path, locals) {
this.page = { ...locals };
if (this.page.path == null) this.page.path = path;
this.path = path;
this.url = full_url_for.call(ctx, path);
this.config = config;
this.theme = theme.config;
this.layout = 'layout';
this.env = env;
this._ = _;
this.view_dir = join(theme_dir, 'layout') + sep;
this.site = localsObj;
}

出现了问题,有些文章打不开了,一直处于加载状态。。。

3. const _ = require("lodash");

大佬解决了嘛

  1. const _ = require("lodash");

大佬解决了嘛

老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了_.的地方,太多了。。。改不动。。。

  1. const _ = require("lodash");

大佬解决了嘛
解决了啊 楼上不有好几个人都说解决了么

  1. const _ = require("lodash");

大佬解决了嘛
解决了啊 楼上不有好几个人都说解决了么

我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态

  1. const _ = require("lodash");

大佬解决了嘛
解决了啊 楼上不有好几个人都说解决了么

我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态

有报什么错么

  1. const _ = require(“ lodash”);

大佬解决了嘛

老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了_.的地方,太多了。。。改不动。。。

我使用3也是出现同样的问题唉

  1. const _ = require(“ lodash”);

大佬解决了嘛

老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了_.的地方,太多了。。。改不动。。。

我使用3也是出现同样的问题唉

输入hexo -v指令,输出是什么?

  1. const _ = require(“ lodash”);

大佬解决了嘛

老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了_.的地方,太多了。。。改不动。。。

我使用3也是出现同样的问题唉

输入hexo -v指令,输出是什么?

解决了大佬, 谢谢~~~

参照 hexojs/hexo#3753
Global Variables_已被移除(

根据你的思路,我找到hexo的提交历史
参照提交历史,修改以下文件并执行命令即可修复

  1. 在博客目录下执行 npm install lodash
  2. 在[BlogPath]/node_modules/hexo/package.json 中加上"lodash": "4.17.20"
    添加后的文件如下:

    "_phantomChildren": {
    "abbrev": "1.1.1",
    "bluebird": "3.7.2",
    "chalk": "4.1.0",
    "command-exists": "1.2.9",
    "hexo-fs": "3.1.0",
    "hexo-log": "2.0.0",
    "hexo-util": "2.4.0",
    "minimist": "1.2.5",
    "resolve": "1.18.1",
    "tildify": "2.0.0",
    "lodash": "4.17.20"
    },
  3. 在[BlogPath]/node_modules/hexo/lib/hexo/index.js 加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('chalk');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
const { runInThisContext } = require('vm');
const { version } = require('../../package.json');
const logger = require('hexo-log');
const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend');
const Render = require('./render');
const registerModels = require('./register_models');
const Post = require('./post');
const Scaffold = require('./scaffold');
const Source = require('./source');
const Router = require('./router');
const Theme = require('../theme');
const Locals = require('./locals');
const defaultConfig = require('./default_config');
const loadDatabase = require('./load_database');
const multiConfigPath = require('./multi_config_path');
const { sync } = require('resolve');
const { deepMerge, full_url_for } = require('hexo-util');
const _ = require('lodash');

class Locals {
constructor(path, locals) {
this.page = { ...locals };
if (this.page.path == null) this.page.path = path;
this.path = path;
this.url = full_url_for.call(ctx, path);
this.config = config;
this.theme = theme.config;
this.layout = 'layout';
this.env = env;
this._ = _;
this.view_dir = join(theme_dir, 'layout') + sep;
this.site = localsObj;
}

太强了 太强了 完美解决

  1. const _ = require(“ lodash”);

大佬解决了嘛
解决了啊楼上不有好几个人都说解决了么

我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态

我也遇到这个问题, 是因为我删掉了/layout/_partial/footer.ejs里面的内容,导致themes/indigo/source/js/main.js的227行nav.nextElementSibling.offsetHeight报错了,你可以看下console的js报错, 如果你的也是这个问题的话, 把nav.nextElementSibling.offsetHeight改成0就可以了

zhz commented

不折腾了,也是部分文章加载有问题,最后回滚到 4.2.1 版本了。

npm uninstall hexo
npm install hexo@4.2.1 --save

参照 hexojs/hexo#3753
Global Variables_已被移除(

根据你的思路,我找到hexo的提交历史
参照提交历史,修改以下文件并执行命令即可修复

  1. 在博客目录下执行 npm install lodash
  2. 在[BlogPath]/node_modules/hexo/package.json 中加上"lodash": "4.17.20"
    添加后的文件如下:

    "_phantomChildren": {
    "abbrev": "1.1.1",
    "bluebird": "3.7.2",
    "chalk": "4.1.0",
    "command-exists": "1.2.9",
    "hexo-fs": "3.1.0",
    "hexo-log": "2.0.0",
    "hexo-util": "2.4.0",
    "minimist": "1.2.5",
    "resolve": "1.18.1",
    "tildify": "2.0.0",
    "lodash": "4.17.20"
    },
  3. 在[BlogPath]/node_modules/hexo/lib/hexo/index.js 加上const _ = require("lodash");this._ = _;
    添加后的文件如下:

const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('chalk');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
const { runInThisContext } = require('vm');
const { version } = require('../../package.json');
const logger = require('hexo-log');
const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend');
const Render = require('./render');
const registerModels = require('./register_models');
const Post = require('./post');
const Scaffold = require('./scaffold');
const Source = require('./source');
const Router = require('./router');
const Theme = require('../theme');
const Locals = require('./locals');
const defaultConfig = require('./default_config');
const loadDatabase = require('./load_database');
const multiConfigPath = require('./multi_config_path');
const { sync } = require('resolve');
const { deepMerge, full_url_for } = require('hexo-util');
const _ = require('lodash');

class Locals {
constructor(path, locals) {
this.page = { ...locals };
if (this.page.path == null) this.page.path = path;
this.path = path;
this.url = full_url_for.call(ctx, path);
this.config = config;
this.theme = theme.config;
this.layout = 'layout';
this.env = env;
this._ = _;
this.view_dir = join(theme_dir, 'layout') + sep;
this.site = localsObj;
}

出现了问题,有些文章打不开了,一直处于加载状态。。。

我是这种情况 #526 文章分级标题 ”### 标题” 这种会报错。 看来只能用hexo4版本了

@zhz 我用了你提供的方法,完美的解决了我的问题,十分感谢!