Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

在主题的 _config.yml 文件中的配置项无法生效 #114

Closed
Mrcxt opened this issue May 28, 2018 · 8 comments
Closed

在主题的 _config.yml 文件中的配置项无法生效 #114

Mrcxt opened this issue May 28, 2018 · 8 comments

Comments

@Mrcxt
Copy link

Mrcxt commented May 28, 2018

plugin version 插件版本

hexo-helper-live2d: 3.0.3

在主题的 _config.yml 文件中的配置项貌似无法生效呐。 只有在网站的 _config.yml 文件中添加配置才会生效,求解

@xiazeyu
Copy link
Collaborator

xiazeyu commented May 28, 2018

@Mrcxt
https://github.com/EYHN/hexo-helper-live2d/blob/master/index.js#L37
如果网站的配置文件里已经有live2d配置组了, 主题里的有话也不会生效。请确认一下..
我们是更推荐使用网站配置文件的。

@Mrcxt
Copy link
Author

Mrcxt commented May 28, 2018

@xiazeyu
我测试了几次,即使网站配置文件里不写live2d的配置,只在主题里写,也是不生效的。不知是不是我个人原因。

不过确实是写在网站配置文件里面要好。只是因为想在自己的主题里写好,让别人用的时候不需要太多的配置,所以才想写到主题配置里面

@xuanzebi

This comment has been minimized.

@Mrcxt Mrcxt closed this as completed Jun 8, 2018
@xiazeyu xiazeyu reopened this Jun 8, 2018
@xiazeyu
Copy link
Collaborator

xiazeyu commented Jun 8, 2018

@Mrcxt 你的主题是
https://github.com/Mrcxt/xiabibi-cactus
吗?我可以帮你看看。

Repository owner deleted a comment from Mrcxt Jun 8, 2018
@Mrcxt
Copy link
Author

Mrcxt commented Jun 8, 2018

@xiazeyu 是哒!

@xiazeyu
Copy link
Collaborator

xiazeyu commented Jun 9, 2018

@Mrcxt emmm
我想了一下,因为hexo安装主题是不通过npm的,也就是说直接把hexo-helper-live2d加入依赖并没有什么用,还需要让用户手动安装
然后试了一下,hexo-helper-live2d在after_render前无法读取hexo.theme.config.live2d,甚至连hexo.theme.config也是undefined

总之好像是我们读取theme设置的时间不对...@EYHN 您当时代码是怎么想的...

@Mrcxt
Copy link
Author

Mrcxt commented Jun 9, 2018

@xiazeyu
总之是这个样子了。貌似也确实没有写在主题配置文件里面的必要,

@xiazeyu
Copy link
Collaborator

xiazeyu commented Jul 22, 2018

Migrated to #116

@xiazeyu xiazeyu closed this as completed Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants