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

我的微博 小部件出现问题 #7

Open
FelixXiong opened this issue Apr 29, 2018 · 2 comments
Open

我的微博 小部件出现问题 #7

FelixXiong opened this issue Apr 29, 2018 · 2 comments

Comments

@FelixXiong
Copy link

以下是代码报错:

/Users/felixxiong/FelixXiongHexoFolder/themes/light/layout/_widget/weibo.ejs:4
    2|   <h3 class="title">我的微博</h3>
    3|     <ul class="weibo">
 >> 4| 	<iframe width="100%" height="<%= theme.weibo.height%>" class="share_self"  frameborder="0" scrolling="no" src="<%- theme.weibo.url %>"></iframe>
    5|     </ul>
    6| </div>

Cannot read property 'height' of undefined
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:11:38)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:48:23)
    at Object.partial (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:39:15)
    at Object.wrapper [as partial] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:12:17)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:9:22)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:120:22)
    at Theme._View.View.View.renderSync (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:48:23)
    at fragment_cache (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:36:52)
    at Object.fragmentCache (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/fragment_cache.js:9:32)
    at Object.wrapper [as fragment_cache] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at Object.partial (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/plugins/helper/partial.js:36:17)
    at Object.wrapper [as partial] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/lodash/lodash.js:4941:19)
    at eval (eval at compile (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:584:12), <anonymous>:18:17)
    at returnedFn (/Users/felixxiong/FelixXiongHexoFolder/node_modules/ejs/lib/ejs.js:615:17)
    at Theme._View.View._compiled.locals [as _compiled] (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:124:48)
    at Theme._View.View.View.render (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:29:15)
    at _compiled.then.result (/Users/felixxiong/FelixXiongHexoFolder/node_modules/hexo/lib/theme/view.js:40:23)

即使设定了之后依然无法显示,设定的值为“200%”。

还有其他的小部件,我想保留国外和国内的服务,我应该如何配置里面的_widget.ejs?
是使用你这里的小部件代码加进去吗?谢谢

@pengloo53
Copy link
Owner

pengloo53 commented Apr 30, 2018

@FelixXiong 报错的是height变量的问题,你在主题配置文件中是否配置了height的值,如下图所示;

default

_widget.ejs 指的是页面右侧的展示,文件夹中每一个文件代表一个插件或服务,想要其他的服务,需要自己往文件夹里添加文件,然后在主题配置中列表列出来即可。

@FelixXiong
Copy link
Author

FelixXiong commented May 3, 2018

@pengloo53 尝试这么做了,不知道是不是我的设置有问题,没有出现。

一些cn的代码应该和light不冲突吧?代码合并的话会好吗?

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