This commit is contained in:
Jerry
2025-12-10 19:23:00 +08:00
5 changed files with 31 additions and 5 deletions

View File

@@ -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