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

如何在导航栏增加新的项目? #53

Open
liaochenlanruo opened this issue Feb 24, 2019 · 4 comments
Open

如何在导航栏增加新的项目? #53

liaochenlanruo opened this issue Feb 24, 2019 · 4 comments

Comments

@liaochenlanruo
Copy link

在配置文件中添加新项目后,hexo g总是会出错,是否还要配置新的文件,谢谢!

@feijian123456
Copy link

能否提供具体情况,如添加的部分和报错的信息之类的

@liaochenlanruo
Copy link
Author

谢谢大佬!
例如我在导航部分添加了如下项目:

photos

  • title: 相册
    icon:photo
    url: photos

hexo g报错如下,hexo s 之后网页空白:
ERROR /home/lhl/blogs/themes/gal/layout/layout.ejs:1

1| <%- partial('_partial/head') %>
2|
3|
4| <%- partial('_partial/slideshow.ejs') %>

/home/lhl/blogs/themes/gal/layout/_partial/head.ejs:41
39| }
40| </style>

41| <% if(theme.leancloud.appid && theme.leancloud.appkey) { %>
42| <script src="//cdn1.lncld.net/static/js/3.4.2/av-min.js"></script>
43| <script>
44| AV.init({

Cannot read property 'appid' of undefined
TypeError: /home/lhl/blogs/themes/gal/layout/layout.ejs:1

1| <%- partial('_partial/head') %>
2|
3|
4| <%- partial('_partial/slideshow.ejs') %>

/home/lhl/blogs/themes/gal/layout/_partial/head.ejs:41
39| }
40| </style>

41| <% if(theme.leancloud.appid && theme.leancloud.appkey) { %>
42| <script src="//cdn1.lncld.net/static/js/3.4.2/av-min.js"></script>
43| <script>
44| AV.init({

Cannot read property 'appid' of undefined
at eval (eval at compile (/home/lhl/blogs/node_modules/_ejs@2.6.1@ejs/lib/ejs.js:618:12), :77:27)
at returnedFn (/home/lhl/blogs/node_modules/_ejs@2.6.1@ejs/lib/ejs.js:653:17)
at Theme._View.View._compiledSync.locals [as _compiledSync] (/home/lhl/blogs/node_modules/hexo/lib/theme/view.js:121:22)
at Theme._View.View.View.renderSync (/home/lhl/blogs/node_modules/hexo/lib/theme/view.js:49:23)
at Object.partial (/home/lhl/blogs/node_modules/hexo/lib/plugins/helper/partial.js:38:15)
at eval (eval at compile (/home/lhl/blogs/node_modules/_ejs@2.6.1@ejs/lib/ejs.js:618:12), :9:17)
at returnedFn (/home/lhl/blogs/node_modules/_ejs@2.6.1@ejs/lib/ejs.js:653:17)
at Theme._View.View._compiled.locals [as _compiled] (/home/lhl/blogs/node_modules/hexo/lib/theme/view.js:125:48)
at Theme._View.View.View.render (/home/lhl/blogs/node_modules/hexo/lib/theme/view.js:30:15)
at _compiled.then.result (/home/lhl/blogs/node_modules/hexo/lib/theme/view.js:41:23)
at tryCatcher (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/promise.js:694:18)
at _drainQueueStep (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/async.js:138:12)
at _drainQueue (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/async.js:131:9)
at Async._drainQueues (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues (/home/lhl/blogs/node_modules/_bluebird@3.5.3@bluebird/js/release/async.js:17:14)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)

@feijian123456
Copy link

从hexo g报错情况看, 是没有配置leancloud,配置leancloud参考该项目wiki 文章热度统计配置

@liaochenlanruo
Copy link
Author

leancloud我已经配置好了,平时没有问题,只是每次想要新添加一个导航栏项目,就会报这种错误,将新添加的项目从config文件中注释掉,就不报错了,实在是摸不着头脑

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

2 participants