From 2207579d1990953c983fa1ea919fdde6e7b9c006 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Fri, 30 Aug 2019 05:40:35 +0100 Subject: [PATCH] feat(metaGenerator): restore metaGenerator * hexo's meta_generator also append to of <svg> Revert "feat(metaGenerator): drop metaGenerator in favor of Hexo's" This reverts commit afb4741be66e334090f62d76db859468fd471ae4. --- _config.yml | 2 ++ scripts/metaGenerator.js | 8 ++++++++ themes/typing/layout/_partial/head.ejs | 1 + 3 files changed, 11 insertions(+) create mode 100644 scripts/metaGenerator.js diff --git a/_config.yml b/_config.yml index d862b48..a2d0ba2 100644 --- a/_config.yml +++ b/_config.yml @@ -86,6 +86,8 @@ neat_svg: deploy: type: +meta_generator: false + feed: icon: 'svg/rss.svg' diff --git a/scripts/metaGenerator.js b/scripts/metaGenerator.js new file mode 100644 index 0000000..39116d5 --- /dev/null +++ b/scripts/metaGenerator.js @@ -0,0 +1,8 @@ +'use strict' +/* global hexo */ + +function metaGeneratorHelper () { + return '<meta name="generator" content="Hexo %s">'.replace('%s', this.env.version) +} + +hexo.extend.helper.register('metaGenerator', metaGeneratorHelper) diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index 9324534..abc4236 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -1,5 +1,6 @@ <head> <meta charset="utf-8"> + <%- metaGenerator() %> <% let title = page.title