Enable meta_generator (#449)

This commit is contained in:
Ljcbaby 2022-01-26 00:54:17 +08:00 committed by GitHub
parent 4b7b2ab907
commit d737534236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,9 @@
{%- else %}
<meta name="theme-color" content="{{ theme.theme_color.light }}">
{%- endif %}
<meta name="generator" content="Hexo {{ hexo_version }}">
{%- if config.meta_generator %}
{{- meta_generator() }}
{%- endif %}
{{ next_pre() }}

View File

@ -23,7 +23,6 @@ module.exports = hexo => {
warning('caching', '`relative_link` option in Hexo `_config.yml`');
hexo.config.relative_link = false;
}
hexo.config.meta_generator = false;
// Custom languages support. Introduced in NexT v6.3.0.
if (data.languages) {

View File

@ -5,11 +5,10 @@
const keys = ['toc', 'reward_settings', 'quicklink'];
hexo.extend.filter.register('template_locals', locals => {
const { version, config } = hexo;
const { config } = hexo;
const { __, theme, page } = locals;
const { i18n } = hexo.theme;
// Hexo & NexT version
locals.hexo_version = version;
locals.next_version = require('../../package.json').version;
// Language & Config
locals.title = __('title') !== 'title' ? __('title') : config.title;