diff --git a/layout/_partials/head/head.njk b/layout/_partials/head/head.njk index 1dad674f0..e85686bb8 100644 --- a/layout/_partials/head/head.njk +++ b/layout/_partials/head/head.njk @@ -6,7 +6,9 @@ {%- else %} {%- endif %} - +{%- if config.meta_generator %} + {{- meta_generator() }} +{%- endif %} {{ next_pre() }} diff --git a/scripts/events/lib/config.js b/scripts/events/lib/config.js index 17aeb4c1e..263776de1 100644 --- a/scripts/events/lib/config.js +++ b/scripts/events/lib/config.js @@ -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) { diff --git a/scripts/filters/locals.js b/scripts/filters/locals.js index 1c500b540..4b3d184a6 100644 --- a/scripts/filters/locals.js +++ b/scripts/filters/locals.js @@ -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;