hexojs / hexo-generator-feed

Feed generator for Hexo.

Home Page:http://hexo.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to access theme variable within a given custom_atom.xml file

Ramesh-X opened this issue · comments

I can't access many of the hexo global variables, including the theme configuration as mentioned here from within a given custom_atom.xml file as a template.

The only variables that can be accessed are posts and config.

Is there any way to access the other global variables as well??

commented

const data = template.render({
config,
url,
icon,
posts,
feed_url
});

Yes, template can only accept some variables. But the plugin is independent of the theme, so I don't think it is necessary to add the theme variable. If you have anything to configure, maybe you can move them to _config.yml

That's how I do it currently.
Thanks for the reply.

As it is not necessary to have a theme for a hexo project, I think this will not be implemented in the future also. Therefore I will close the issue.