mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
fix(gitalk): 修复 MD5 函数导致的评论聚合问题
- 修改 url_for 调用添加 {relative: false} 参数
- 解决空字符串 MD5 导致多页面评论混合的问题
This commit is contained in:
@@ -48,7 +48,7 @@ hexo.extend.helper.register('urlNoIndex', function (url = null, trailingIndex =
|
||||
})
|
||||
|
||||
hexo.extend.helper.register('md5', function (path) {
|
||||
return crypto.createHash('md5').update(decodeURI(this.url_for(path))).digest('hex')
|
||||
return crypto.createHash('md5').update(decodeURI(this.url_for(path, {relative: false}))).digest('hex')
|
||||
})
|
||||
|
||||
hexo.extend.helper.register('injectHtml', data => {
|
||||
|
||||
Reference in New Issue
Block a user