Add third banner image to content upload pipeline
This commit is contained in:
+14
-1
@@ -54,6 +54,17 @@ export const BLOG_POST_SCHEMA = {
|
||||
},
|
||||
},
|
||||
},
|
||||
banner: {
|
||||
type: "object",
|
||||
required: false,
|
||||
default: null,
|
||||
properties: {
|
||||
horizontal: {
|
||||
type: "string",
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
background: {
|
||||
type: "object",
|
||||
required: false,
|
||||
@@ -162,7 +173,9 @@ export function sanitizeBlogPost(frontmatter) {
|
||||
if (frontmatter[field] !== undefined) {
|
||||
// Special handling for thumbnail and background objects
|
||||
if (
|
||||
(field === "thumbnail" || field === "background") &&
|
||||
(field === "thumbnail" ||
|
||||
field === "background" ||
|
||||
field === "banner") &&
|
||||
typeof frontmatter[field] === "object"
|
||||
) {
|
||||
sanitized[field] = frontmatter[field];
|
||||
|
||||
Reference in New Issue
Block a user