Metadata

Docs




Dynamic SSR (with segment)

12:50:21 PM

/metadata/ssr/[segment]

export async function generateMetadata(
  { searchParams }: Props,
  parent: ResolvingMetadata,
): Promise<Metadata> {
  const { title } = await parent;

  return {
    title: `${title?.absolute} - ${searchParams.id}`,
  };
}

export const metadata: Metadata = {
  title: 'Dynamic SSR',
};