Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo g出现问题 #524

Open
Steady-brother opened this issue Nov 15, 2020 · 2 comments
Open

hexo g出现问题 #524

Steady-brother opened this issue Nov 15, 2020 · 2 comments

Comments

@Steady-brother
Copy link

ERROR ReferenceError: /Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/archive.ejs:6
4| }) %>
5|

6| <%
7| var posts = [];
8|
9| page.posts.each(function(post){

_ is not defined
at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/archive.ejs:24:25)
at archive (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/apple/Documents/steady/blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (stream_readable.js:479:10)
at resume
(_stream_readable.js:966:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
path: '/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/archive.ejs'
}
ERROR ReferenceError: /Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/tag.ejs:1

1| <%- partial('tags', {
2| title: theme.tags_title + ': '+ page.tag
3| }) %>
4|

/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/tags.ejs:1

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

/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/header.ejs:40
38|


39|

40| <%- partial('tags-bar', {
41| type: hdClass.split('-')[0]
42| }) %>
43|

/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/tags-bar.ejs:7
5| <%= __('tag.all') %>

7| <%
8| var options = [];
9|
10| (type === 'tags' ? site.tags : site.categories).each(function(o) {

_ is not defined
at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/tags-bar.ejs:34:25)
at tags-bar (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiledSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:132:24)
at _View.renderSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:59:25)
at Object.partial (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/header.ejs:57:17)
at header (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiledSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:132:24)
at _View.renderSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:59:25)
at Object.partial (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/tags.ejs:10:17)
at tags (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiledSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:132:24)
at _View.renderSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:59:25)
at Object.partial (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/tag.ejs:10:17)
at tag (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/apple/Documents/steady/blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/method.js:15:34 {
path: '/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/tag.ejs'
}
ERROR {
err: ReferenceError: /Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs:6
4|
5| <%- partial('_partial/loading') %>

6| <%- partial('_partial/menu') %>
7|


8| <%- body %>
9| <%- partial('_partial/footer') %>

/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:27
25| menuItem = theme.menu[i];
26| %>

27|


  • 28| <a href="<%- url_for(menuItem.url) %>" <% if(menuItem.target){ %>target="_blank"<% } %> >
    29|
    30| <%=(menuItem.text || _.startCase(i)) %>

  • _ is not defined
    at isActive (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:34:88)
    at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:42:11)
    at menu (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs:18:17)
    at layout (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:39:17)
    at /Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:51:25
    at tryCatcher (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21) {
    path: '/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs'
    }
    } Render HTML failed: index.html
    ERROR ReferenceError: /Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs:6
    4|
    5| <%- partial('_partial/loading') %>

    6| <%- partial('_partial/menu') %>
    7|


    8| <%- body %>
    9| <%- partial('_partial/footer') %>

    /Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:27
    25| menuItem = theme.menu[i];
    26| %>

    27|


  • 28| <a href="<%- url_for(menuItem.url) %>" <% if(menuItem.target){ %>target="_blank"<% } %> >
    29|
    30| <%=(menuItem.text || _.startCase(i)) %>

  • _ is not defined
    at isActive (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:34:88)
    at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/_partial/menu.ejs:42:11)
    at menu (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiledSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:132:24)
    at _View.renderSync (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:59:25)
    at Object.partial (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
    at eval (/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs:18:17)
    at layout (/Users/apple/Documents/steady/blog/node_modules/ejs/lib/ejs.js:682:17)
    at _View._compiled (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:136:50)
    at _View.render (/Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:39:17)
    at /Users/apple/Documents/steady/blog/node_modules/hexo/lib/theme/view.js:51:25
    at tryCatcher (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/apple/Documents/steady/blog/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:461:21) {
    path: '/Users/apple/Documents/steady/blog/themes/hexo-theme-indigo/layout/layout.ejs'
    }
    INFO Generated: sitemap.xml
    INFO 1 files generated in 75 ms

    @MrChen1993
    Copy link

    MrChen1993 commented Nov 15, 2020

    使用hexo4或者把_.xxx 替换为原生的写法;
    参考hexo说明
    You-Dont-Need-Lodash-Underscore

    @naivesecret
    Copy link

    我曾找过很久的博客主题,觉得就 indigo 最好看,没有之一,可惜作者不维护了呀。。。

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants