Skip to content

Commit

Permalink
Enable meta_generator (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcbaby committed Jan 25, 2022
1 parent 4b7b2ab commit d737534
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion layout/_partials/head/head.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}

Expand Down
1 change: 0 additions & 1 deletion scripts/events/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions scripts/filters/locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d737534

Please sign in to comment.