fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.53k stars 275 forks source link

报错了 #109

Closed zhangguanzhang closed 6 years ago

zhangguanzhang commented 6 years ago

$ hexo server INFO Start processing INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop. Unhandled rejection TypeError: C:\Users\guanzhang\Desktop\test2\themes\archer\layout\layout.ejs:3 1| <!DOCTYPE html> 2|

3| <%- partial('_partial/base-head') %> 4| <% if (is_home()) { %> 5| 6| <% } else if(is_post()){ %>

C:\Users\guanzhang\Desktop\test2\themes\archer\layout_partial\base-head.ejs:39 37| 38| var algolia = {

39| applicationID: '<%- config.algolia.applicationID %>', 40| apiKey: '<%- config.algolia.apiKey %>', 41| indexName: '<%- config.algolia.indexName %>', 42| hits: hits,

Cannot read property 'applicationID' of undefined at eval (eval at compile (C:\Users\guanzhang\Desktop\test2\node_modules\ejs\lib\ejs.js:618:12), :82:32) at returnedFn (C:\Users\guanzhang\Desktop\test2\node_modules\ejs\lib\ejs.js:653:17) at Theme._View.View._compiledSync.locals [as _compiledSync] (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\theme\view.js:120:22) at Theme._View.View.View.renderSync (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\plugins\helper\partial.js:39:15) at Object.wrapper [as partial] (C:\Users\guanzhang\Desktop\test2\node_modules\lodash\lodash.js:4949:19) at eval (eval at compile (C:\Users\guanzhang\Desktop\test2\node_modules\ejs\lib\ejs.js:618:12), :11:17) at returnedFn (C:\Users\guanzhang\Desktop\test2\node_modules\ejs\lib\ejs.js:653:17) at Theme._View.View._compiled.locals [as _compiled] (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\theme\view.js:29:15) at _compiled.then.result (C:\Users\guanzhang\Desktop\test2\node_modules\hexo\lib\theme\view.js:40:23) at tryCatcher (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues (C:\Users\guanzhang\Desktop\test2\node_modules\bluebird\js\release\async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5)

pfrankw commented 6 years ago

I had the same error.

This fixes it: https://github.com/fi3ework/hexo-theme-archer/pull/108