feat: use meta_generator helper instead of filter

https://github.com/hexojs/hexo/pull/3669
This commit is contained in:
curben 2019-08-11 11:11:01 +09:30
parent 2b4a4b8ca5
commit 63150f5153
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
3 changed files with 10 additions and 0 deletions

View File

@ -86,6 +86,8 @@ neat_svg:
deploy: deploy:
type: type:
meta_generator: false
# theme config # theme config
theme_config: theme_config:
# Lang # Lang

View File

@ -1,5 +1,6 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<%- meta_generator() %>
<% <%
let title = page.title let title = page.title

View File

@ -0,0 +1,7 @@
'use strict'
function metaGeneratorHelper () {
return '<meta name="generator" content="Hexo %s">'.replace('%s', this.env.version)
}
hexo.extend.helper.register('meta_generator', metaGeneratorHelper)