게시물 OG 이미지 설정 추가

This commit is contained in:
2026-05-03 10:10:09 +09:00
parent fc5f41b9cc
commit 8c5ccc94ec
14 changed files with 157 additions and 14 deletions

View File

@@ -11,6 +11,7 @@ export const adminPostInputSchema = z.object({
seoDescription: z.string().trim().max(180).default(''),
canonicalUrl: z.string().trim().url().or(z.literal('')).default(''),
noindex: z.boolean().default(false),
ogImage: z.string().trim().nullable().default(null),
status: postStatusSchema.default('draft'),
publishedAt: z.string().datetime().nullable().default(null),
tags: z.array(z.string().trim().min(1)).default([])

View File

@@ -13,6 +13,7 @@ export const postSchema = z.object({
seoDescription: z.string().default(''),
canonicalUrl: z.string().default(''),
noindex: z.boolean().default(false),
ogImage: z.string().nullable().default(null),
status: postStatusSchema,
publishedAt: z.string().nullable().default(null),
createdAt: z.string(),

View File

@@ -203,6 +203,13 @@ const getContentMediaUsage = (contentItem, url) => {
})
}
if (contentItem.ogImage === url) {
usages.push({
location: 'ogImage',
label: 'OG 이미지'
})
}
if (contentItem.content?.includes(url)) {
usages.push({
location: 'content',