We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Cache
Please check followings before submitting a new feature request.
https://github.com/hexojs/hexo/blob/master/lib/plugins/filter/after_render/meta_generator.js
Currently, the meta_generator filter has performance problems. It is recommended to use a helper, but regular matching will still be used.
Maybe use Cache is a good solution.
function metaGeneratorHelper() { cache.set('meta_generator', true); return `<meta name="generator" content="Hexo ${this.env.version}">`; }
function hexoMetaGeneratorInject(data) { let flag = cache.get('meta_generator'); if (flag) return; const { config } = this; //... }
#4047 Inject can also do this, if use helpers in the theme, can improve performance.
The text was updated successfully, but these errors were encountered:
I assume what you mean is a global plugins' status manager.
Sorry, something went wrong.
We could add this.prop = {} into helper's constructor(), And set ctx.extend.helper.prop.meta_generator = true inside meta_generator().
this.prop = {}
helper
constructor()
ctx.extend.helper.prop.meta_generator = true
meta_generator()
Later in meta_generator filter we could read this.extend.helper.prop.meta_generator to determine if meta_generator() helper is used or not.
meta_generator
this.extend.helper.prop.meta_generator
Successfully merging a pull request may close this issue.
Check List
Please check followings before submitting a new feature request.
Feature Request
https://github.com/hexojs/hexo/blob/master/lib/plugins/filter/after_render/meta_generator.js
Currently, the meta_generator filter has performance problems. It is recommended to use a helper, but regular matching will still be used.
Maybe use Cache is a good solution.
Others
#4047 Inject can also do this, if use helpers in the theme, can improve performance.
The text was updated successfully, but these errors were encountered: