mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
Merge branch 'dev' of https://github.com/jerryc127/hexo-theme-butterfly into dev
This commit is contained in:
@@ -41,7 +41,7 @@ hexo.extend.generator.register('post', locals => {
|
||||
const coverGenerator = createCoverGenerator()
|
||||
|
||||
const handleImg = data => {
|
||||
let { cover: coverVal, top_img: topImg } = data
|
||||
let { cover: coverVal, top_img: topImg, pagination_cover: paginationCover } = data
|
||||
|
||||
// Add path to top_img and cover if post_asset_folder is enabled
|
||||
if (postAssetFolder) {
|
||||
@@ -51,6 +51,9 @@ hexo.extend.generator.register('post', locals => {
|
||||
if (coverVal && coverVal.indexOf('/') === -1 && imgTestReg.test(coverVal)) {
|
||||
data.cover = `${data.path}${coverVal}`
|
||||
}
|
||||
if (paginationCover && paginationCover.indexOf('/') === -1 && imgTestReg.test(paginationCover)) {
|
||||
data.pagination_cover = `${data.path}${paginationCover}`
|
||||
}
|
||||
}
|
||||
|
||||
if (coverVal === false) return data
|
||||
|
||||
Reference in New Issue
Block a user