zthxxx / hexo-theme-Wikitten

A theme of Hexo for personal wiki which seems like Wikitten style.
https://wiki.zthxxx.me/
MIT License
685 stars 133 forks source link

无法生成网站 #66

Closed yanickxia closed 4 years ago

yanickxia commented 4 years ago

版本信息

git:(private-master) ✗ hexo version
hexo: 3.7.1
hexo-cli: 3.1.0
os: Linux 5.4.0-37-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

Package.json

"hexo": {
    "version": "3.7.1"
  },
  "dependencies": {
    "hexo": "^3.6.0",
    "hexo-autonofollow": "^1.0.1",
    "hexo-baidu-url-submit": "^0.0.5",
    "hexo-deployer-git": "0.3.1",
    "hexo-directory-category": "^1.0.7",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-json-content": "^3.0.1",
    "hexo-generator-sitemap": "^1.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.1.2"
  }

问题

在渲染页面的 hexo g 的时候会出现

/home/yanick/codes/mine/yann-wiki/themes/Wikitten/layout/common/head.ejs:40                                               
    38|     <% } %>                                                                                                       
    39|     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />                       
 >> 40|     <%- open_graph({                                                                                              
    41|         image:          thumbnail(page),                                                                          
    42|         fb_app_id:      theme.miscellaneous.open_graph.fb_app_id,                                                 
    43|         fb_admins:      theme.miscellaneous.open_graph.fb_admins,                                                 

Cannot read property 'open_graph' of undefined                                                                            
    at eval (eval at compile (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:66:45)   
    at returnedFn (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:615:17)                                  
    at Theme._View.View._compiledSync (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:120:22)      
    at Theme._View.View.View.renderSync (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:48:23)     
    at Object.partial (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/plugins/helper/partial.js:39:15)           
    at Object.wrapper [as partial] (/home/yanick/codes/mine/yann-wiki/node_modules/lodash/lodash.js:4941:19)              
    at eval (eval at compile (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:7:17)    
    at returnedFn (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:615:17)                                  
    at Theme._View.View._compiled (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:124:48)          
    at Theme._View.View.View.render (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:29:15)         
    at /home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:40:23                                        
    at tryCatcher (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/util.js:16:23)                      
    at Promise._settlePromiseFromHandler (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:512:31)                                                                                                                     
    at Promise._settlePromise (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:569:18)      
    at Promise._settlePromise0 (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:614:10)     
    at Promise._settlePromises (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:693:18)     
    at Async._drainQueue (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:133:16)             
    at Async._drainQueues (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:143:10)            
    at Immediate.Async.drainQueues [as _onImmediate] (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:17:14)                                                                                                            
    at processImmediate (internal/timers.js:456:21)                                                                       
ERROR /home/yanick/codes/mine/yann-wiki/themes/Wikitten/layout/layout.ejs:1
 >> 1| <%- partial('common/head') %>
    2| <body>
    3|     <div id="container">
    4|         <%- partial('common/header') %>

/home/yanick/codes/mine/yann-wiki/themes/Wikitten/layout/common/head.ejs:40
    38|     <% } %>
    39|     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
 >> 40|     <%- open_graph({
    41|         image:          thumbnail(page),
    42|         fb_app_id:      theme.miscellaneous.open_graph.fb_app_id,
    43|         fb_admins:      theme.miscellaneous.open_graph.fb_admins,

Cannot read property 'open_graph' of undefined
TypeError: /home/yanick/codes/mine/yann-wiki/themes/Wikitten/layout/layout.ejs:1
 >> 1| <%- partial('common/head') %>                                                                                      
    2| <body>                                                                                                             
    3|     <div id="container">                                                                                           
    4|         <%- partial('common/header') %>                                                                            

/home/yanick/codes/mine/yann-wiki/themes/Wikitten/layout/common/head.ejs:40                                               
    38|     <% } %>                                                                                                       
    39|     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />                       
 >> 40|     <%- open_graph({                                                                                              
    41|         image:          thumbnail(page),                                                                          
    42|         fb_app_id:      theme.miscellaneous.open_graph.fb_app_id,                                                 
    43|         fb_admins:      theme.miscellaneous.open_graph.fb_admins,                                                 

Cannot read property 'open_graph' of undefined                                                                            
    at eval (eval at compile (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:66:45)   
    at returnedFn (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:615:17)                                  
    at Theme._View.View._compiledSync (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:120:22)      
    at Theme._View.View.View.renderSync (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:48:23)     
    at Object.partial (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/plugins/helper/partial.js:39:15)           
    at Object.wrapper [as partial] (/home/yanick/codes/mine/yann-wiki/node_modules/lodash/lodash.js:4941:19)              
    at eval (eval at compile (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:7:17)    
    at returnedFn (/home/yanick/codes/mine/yann-wiki/node_modules/ejs/lib/ejs.js:615:17)                                  
    at Theme._View.View._compiled (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:124:48)          
    at Theme._View.View.View.render (/home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:29:15)         
    at /home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/theme/view.js:40:23                                        
    at tryCatcher (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/util.js:16:23)                      
    at Promise._settlePromiseFromHandler (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:512:31)                                                                                                                     
    at Promise._settlePromise (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:569:18)      
    at Promise._settlePromise0 (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:614:10)     
    at Promise._settlePromises (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/promise.js:693:18)     
    at Async._drainQueue (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:133:16)             
    at Async._drainQueues (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:143:10)            
    at Immediate.Async.drainQueues [as _onImmediate] (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/async.js:17:14)                                                                                                            
    at processImmediate (internal/timers.js:456:21)                                                                       
ERROR Asset render failed: css/style.css
CoercionError: /home/yanick/codes/mine/yann-wiki/themes/Wikitten/source/css/_variables.styl:30:54
   26| // Header                                                                                                          
   27| header-height = 48px                                                                                               
   28| header-sub-height = 36px                                                                                           
   29| logo-url = hexo-config("customize.logo.url")                                                                       
   30| logo-width = 0px + hexo-config("customize.logo.width")                                                             
------------------------------------------------------------^                                                             
   31| logo-height = 0px + hexo-config("customize.logo.height")                                                           
   32|                                                                                                                    
   33| // Sidebar                                                                                                         

cannot coerce '' to unit                                                                                                  

    at Unit.coerce (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/nodes/node.js:248:11)                       
    at Unit.coerce (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/nodes/unit.js:209:43)                       
    at Unit.operate (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/nodes/unit.js:132:20)                      
    at Evaluator.visitBinOp (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:581:28)       
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.visitExpression (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:644:26)  
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.visitIdent (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:551:22)       
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.visitBlock (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:720:39)       
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.importFile (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:99:18)        
    at Evaluator.visitImport (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:920:27)      
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.visitRoot (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:707:27)        
    at Evaluator.Visitor.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/index.js:28:40)         
    at Evaluator.visit (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:160:18)            
    at Evaluator.evaluate (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/visitor/evaluator.js:247:15)         
    at Renderer.render (/home/yanick/codes/mine/yann-wiki/node_modules/stylus/lib/renderer.js:86:26)                      
    at Hexo.module.exports (/home/yanick/codes/mine/yann-wiki/node_modules/hexo-renderer-stylus/lib/renderer.js:53:6)     
    at Hexo.tryCatcher (/home/yanick/codes/mine/yann-wiki/node_modules/bluebird/js/release/util.js:16:23)                 
    at Hexo.ret (eval at makeNodePromisifiedEval (/home/yanick/.nvm/versions/node/v12.18.0/lib/node_modules/hexo/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:11:39)                                                          
    at /home/yanick/codes/mine/yann-wiki/node_modules/hexo/lib/hexo/render.js:61:21    

以为是 ejs 的问题,升级之后也没用。

yanickxia commented 4 years ago

忘了cp config了··我的

zthxxx commented 4 years ago

描述信息挺详细的 🤓