Closed icylogic closed 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.
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?
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.
like options for disqus or duoshuo.