Skip to content

Commit

Permalink
feat: use meta_generator helper instead of filter
Browse files Browse the repository at this point in the history
  • Loading branch information
curben committed Aug 11, 2019
1 parent 2b4a4b8 commit 63150f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ neat_svg:
deploy:
type:

meta_generator: false

# theme config
theme_config:
# Lang
Expand Down
1 change: 1 addition & 0 deletions themes/typing/layout/_partial/head.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<head>
<meta charset="utf-8">
<%- meta_generator() %>
<%
let title = page.title
Expand Down
7 changes: 7 additions & 0 deletions themes/typing/scripts/meta_generator.js
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 63150f5

Please sign in to comment.