icylogic / carbon

A blazing slow hexo theme
MIT License
46 stars 12 forks source link

merge theme/_config into _config? #13

Closed icylogic closed 9 years ago

icylogic commented 9 years ago

like options for disqus or duoshuo.

thinkingofmaud commented 9 years ago

I think disqus and duoshuo should be on the main blog config, not on the theme. It makes more sense that way, since config.disqus_shortname is the 'standard' and works with all themes that support it.

But I noticed the other themes with duoshuo support mainly use theme.duoshuo or even a boolean theme.duoshuo with another handle for the duoshuo id.

icylogic commented 9 years ago

OK. I agree that disqus_shortname and duoshuo_shortname should be in the main config.

And I've been considering how do we deal with the condition that both exist and not void? An additional switch?

thinkingofmaud commented 9 years ago

Well, I checked the hexo documentation: theme inherits from config. So the code works with theme.duoshuo even if we "only" have config.duoshuo. I even tested it, it works. Clever!

So maybe that is why the chinese themes with duoshuo support all use theme.duoshuo or/and theme.duoshuo_id. I think you should keep the code as is, but perhaps you may change the handle.