mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-21 19:32:34 +00:00
Enable meta_generator (#449)
This commit is contained in:
parent
4b7b2ab907
commit
d737534236
@ -6,7 +6,9 @@
|
|||||||
{%- else %}
|
{%- else %}
|
||||||
<meta name="theme-color" content="{{ theme.theme_color.light }}">
|
<meta name="theme-color" content="{{ theme.theme_color.light }}">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<meta name="generator" content="Hexo {{ hexo_version }}">
|
{%- if config.meta_generator %}
|
||||||
|
{{- meta_generator() }}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{{ next_pre() }}
|
{{ next_pre() }}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,6 @@ module.exports = hexo => {
|
|||||||
warning('caching', '`relative_link` option in Hexo `_config.yml`');
|
warning('caching', '`relative_link` option in Hexo `_config.yml`');
|
||||||
hexo.config.relative_link = false;
|
hexo.config.relative_link = false;
|
||||||
}
|
}
|
||||||
hexo.config.meta_generator = false;
|
|
||||||
|
|
||||||
// Custom languages support. Introduced in NexT v6.3.0.
|
// Custom languages support. Introduced in NexT v6.3.0.
|
||||||
if (data.languages) {
|
if (data.languages) {
|
||||||
|
|||||||
@ -5,11 +5,10 @@
|
|||||||
const keys = ['toc', 'reward_settings', 'quicklink'];
|
const keys = ['toc', 'reward_settings', 'quicklink'];
|
||||||
|
|
||||||
hexo.extend.filter.register('template_locals', locals => {
|
hexo.extend.filter.register('template_locals', locals => {
|
||||||
const { version, config } = hexo;
|
const { config } = hexo;
|
||||||
const { __, theme, page } = locals;
|
const { __, theme, page } = locals;
|
||||||
const { i18n } = hexo.theme;
|
const { i18n } = hexo.theme;
|
||||||
// Hexo & NexT version
|
// Hexo & NexT version
|
||||||
locals.hexo_version = version;
|
|
||||||
locals.next_version = require('../../package.json').version;
|
locals.next_version = require('../../package.json').version;
|
||||||
// Language & Config
|
// Language & Config
|
||||||
locals.title = __('title') !== 'title' ? __('title') : config.title;
|
locals.title = __('title') !== 'title' ? __('title') : config.title;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user