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

For better performance, I need to set meta_generator to be false???? #3919

Closed
mystic-cg opened this issue Dec 9, 2019 · 5 comments · May be fixed by #4070
Closed

For better performance, I need to set meta_generator to be false???? #3919

mystic-cg opened this issue Dec 9, 2019 · 5 comments · May be fixed by #4070

Comments

@mystic-cg
Copy link

@mystic-cg mystic-cg commented Dec 9, 2019

hexo version: 4.1.0

Hexo 3.9.0+ inserts the tag automatically; to get the performance benefit, meta_generator: option needs to be disabled,
_config.yml
meta_generator: false

@SukkaW

This comment has been minimized.

Copy link
Member

@SukkaW SukkaW commented Dec 9, 2019

We recommend to disable meta_generator in your _config.yml if you have already added meta_generator() in your theme layout.

@mystic-cg

This comment has been minimized.

Copy link
Author

@mystic-cg mystic-cg commented Dec 10, 2019

Okay, I'll check it. Thanks for your reply.

@carl0schen

This comment has been minimized.

Copy link

@carl0schen carl0schen commented Dec 10, 2019

If insert meta_generator() and meta_generator: false, My <head> output is:
<meta name="generator" content="Hexo undefined">

Why can't I get the version?

But remove meta_generator() and meta_generator: false, My <head> output is:
<meta name="generator" content="Hexo 4.1.0">

Why is this meta tag displayed correctly?

@curbengh

This comment has been minimized.

Copy link
Contributor

@curbengh curbengh commented Dec 10, 2019

The implementation is incorrect, I'll fix it up.

Edit: #3925

@curbengh curbengh mentioned this issue Dec 10, 2019
2 of 2 tasks complete
curbengh added a commit to curbengh/hexo-site that referenced this issue Dec 10, 2019
@SukkaW SukkaW mentioned this issue Jan 10, 2020
2 of 2 tasks complete
@SukkaW

This comment has been minimized.

Copy link
Member

@SukkaW SukkaW commented Jan 10, 2020

This issue should be fixed by #4070.

Once theme has used meta_generator(), the meta_generator filter will be disabled automatically .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.