mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
✨ 增加facebook comments
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user