Update page.tsx
This commit is contained in:
@@ -19,12 +19,15 @@ export async function generateMetadata({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const { story } = result;
|
const { story, pages } = result;
|
||||||
const title = `${story.title} | MakeComics`;
|
const title = `${story.title} | MakeComics`;
|
||||||
const description =
|
const description =
|
||||||
story.description ||
|
story.description ||
|
||||||
`${story.title} - Create your own comic book with MakeComics`;
|
`${story.title} - Create your own comic book with MakeComics`;
|
||||||
|
|
||||||
|
// Use the first page's image as the Open Graph image, or default if none
|
||||||
|
const firstPageImage = pages.length > 0 && pages[0].generatedImageUrl ? pages[0].generatedImageUrl : "/placeholder.jpg";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
@@ -32,6 +35,7 @@ export async function generateMetadata({
|
|||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
type: "website",
|
type: "website",
|
||||||
|
images: [firstPageImage],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user