fix: remove unused ogImage size validation (#462)

* fix: remove unused ogImage size validation

Validation of `ogImage` field in blog collection
causes unintentional broken og images after the build.
Removing the validation solve the issue.

* docs: update docs for ogImage path

* chore: update asset
This commit is contained in:
Sat Naing
2025-03-09 19:27:20 +07:00
committed by GitHub
parent a4a5ced8a6
commit 212fd5c550
5 changed files with 19 additions and 28 deletions
+1 -6
View File
@@ -13,12 +13,7 @@ const blog = defineCollection({
featured: z.boolean().optional(),
draft: z.boolean().optional(),
tags: z.array(z.string()).default(["others"]),
ogImage: image()
.refine(img => img.width >= 1200 && img.height >= 630, {
message: "OpenGraph image must be at least 1200 X 630 pixels!",
})
.or(z.string())
.optional(),
ogImage: image().or(z.string()).optional(),
description: z.string(),
canonicalURL: z.string().optional(),
editPost: z