feat: Post edit Easily browse and edit blog source code online

This commit is contained in:
weilining
2021-01-11 03:33:52 +08:00
parent a1f86a1573
commit 9cac14411d
5 changed files with 26 additions and 1 deletions

View File

@@ -70,3 +70,9 @@ hexo.extend.helper.register('injectHtml', function (data) {
}
return result
})
hexo.extend.helper.register('post_edit', function(src) {
const { post_edit } = this.theme;
if (!post_edit.enable) return '';
return post_edit.url + src
})