增加facebook comments

This commit is contained in:
Jerry
2020-04-19 16:05:47 +08:00
parent b512eb761d
commit 8953e2e1aa
15 changed files with 79 additions and 32 deletions

View File

@@ -42,3 +42,12 @@ hexo.extend.helper.register('cloudTags', function (source, minfontsize, maxfonts
})
return result
})
hexo.extend.helper.register('urlNoIndex', function () {
const { permalink } = hexo.config
let url = this.url.replace(/index\.html$/, '')
if (!permalink.endsWith('.html')) {
url = url.replace(/\.html$/, '')
}
return url
})