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

Option to remove generator from output atom.xml #101

Closed
freak3dot opened this issue Oct 19, 2019 · 4 comments
Closed

Option to remove generator from output atom.xml #101

freak3dot opened this issue Oct 19, 2019 · 4 comments
Assignees

Comments

@freak3dot
Copy link

I would like to remove the <generator uri="http://hexo.io/">Hexo</generator> tag from my atom.xml file. I'm using version 2.0.0 of hexo-generator-feed.

The generator tag is not required per https://validator.w3.org/feed/docs/atom.html#optionalFeedElements

I believe it adds unnecessary bytes to the payload. I also believe it reveals details about my site that I would rather not share.

I looked through the options and there is no option to remove the tag via options.

I also looked for an option to replace the template with my own template. That option doesn't exist either. The option to replace the template would be useful for a wide variety of use cases and is probably the best solution. For an example of a template option, see https://github.com/hexojs/hexo-generator-sitemap

@SukkaW
Copy link
Member

SukkaW commented Oct 19, 2019

Well, you see, it is an optional tag, not a deprecated tag. I see no reason we have to remove it.

'<generator uri="http://hexo.io/">Hexo</generator>'.length
// 49

49 bytes is not such a big payload, unless your RSS is been requested 1 Million times a day or more.

@freak3dot
Copy link
Author

49 bytes is not such a big payload

That's only one of the reasons I want to remove it. The other reason is that it reveals details about the tooling behind my site. That used to be a problem before static sites because that information could be used to exploit the site. I guess it's not much of an issue with a static site.

In any case my real suggestion is that hexo-generator-feed should have an option for a custom template like hexo-generator-sitemap. This would allow developers to customize the feed in numerous ways. It would meet my needs as well as allow developers to support other use cases like replacing text.

@curbengh
Copy link
Contributor

curbengh commented Nov 17, 2019

In any case my real suggestion is that hexo-generator-feed should have an option for a custom template like hexo-generator-sitemap.

+1

Meanwhile, another option is that you could also re-implement this plugin as a custom script, which is what I did for my blog (source).

@curbengh curbengh self-assigned this Nov 17, 2019
@tomap
Copy link
Contributor

tomap commented Nov 18, 2019

Making a bit of publicity for Hexo is our right. As this plugin is open source. It's up to you to clone it and remove the publicity :)

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

4 participants