This commit is contained in:
Jerry
2020-07-16 19:30:54 +08:00
parent 5b6e008b84
commit 898cc31c58
93 changed files with 2128 additions and 2151 deletions

View File

@@ -9,6 +9,7 @@
'use strict'
const { stripHTML, escapeHTML } = require('hexo-util')
const crypto = require('crypto')
hexo.extend.helper.register('page_description', function () {
const { config, page } = this
@@ -56,3 +57,7 @@ hexo.extend.helper.register('urlNoIndex', function () {
}
return url
})
hexo.extend.helper.register('md5', function (path) {
return crypto.createHash('md5').update(decodeURI(this.url_for(path))).digest('hex')
})