@@ -7,7 +7,7 @@ import type { StoriesIndexEntry } from '@/types/common';
77import { readFileSync } from 'fs' ;
88import matter from 'gray-matter' ;
99import jsonata from 'jsonata' ;
10- import type { Metadata , ResolvingMetadata } from 'next' ;
10+ import type { Metadata } from 'next' ;
1111import Link from 'next/link' ;
1212import { notFound } from 'next/navigation' ;
1313import path from 'path' ;
@@ -66,14 +66,9 @@ async function listRandomStories() {
6666 }
6767}
6868
69- export async function generateMetadata (
70- { params } : Props ,
71- parent : ResolvingMetadata ,
72- ) : Promise < Metadata > {
69+ export async function generateMetadata ( { params } : Props ) : Promise < Metadata > {
7370 const story = await getStoryBySlug ( params . slug ) ;
7471
75- const previousImages = ( await parent ) . openGraph ?. images || [ ] ;
76-
7772 return {
7873 title : story . title ,
7974 description : story . subtitle ,
@@ -82,12 +77,12 @@ export async function generateMetadata(
8277 twitter : {
8378 title : story . title ,
8479 description : story . subtitle ,
85- images : [ story . cover , ... previousImages ] ,
80+ images : story . cover ,
8681 } ,
8782 openGraph : {
8883 title : story . title ,
8984 description : story . subtitle ,
90- images : [ story . cover , ... previousImages ] ,
85+ images : story . cover ,
9186 } ,
9287 } ;
9388}
0 commit comments