본문 이미지 최적화·라이트박스·번호형 페이지네이션 반영 (v1.10.3)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
} from '../../lib/display-count-settings.js'
|
||||
import { normalizeSocialLinks } from '../../lib/social-links.js'
|
||||
import {
|
||||
createPostBodyThumbnailsForContent,
|
||||
createPostThumbnailForImageUrl,
|
||||
getExistingPostThumbnailUrl
|
||||
} from '../utils/post-thumbnail-image.js'
|
||||
@@ -553,7 +554,10 @@ export const createAdminPost = async (input, authorId) => {
|
||||
return insertedRows
|
||||
})
|
||||
|
||||
await createPostThumbnailForImageUrl(input.featuredImage)
|
||||
await Promise.all([
|
||||
createPostThumbnailForImageUrl(input.featuredImage),
|
||||
createPostBodyThumbnailsForContent(input.content)
|
||||
])
|
||||
|
||||
return getAdminPostById(rows[0].id)
|
||||
}
|
||||
@@ -606,7 +610,10 @@ export const updateAdminPost = async (id, input, editorId) => {
|
||||
})
|
||||
|
||||
if (rows[0]) {
|
||||
await createPostThumbnailForImageUrl(input.featuredImage)
|
||||
await Promise.all([
|
||||
createPostThumbnailForImageUrl(input.featuredImage),
|
||||
createPostBodyThumbnailsForContent(input.content)
|
||||
])
|
||||
}
|
||||
|
||||
return rows[0] ? getAdminPostById(rows[0].id) : null
|
||||
|
||||
Reference in New Issue
Block a user