import { SITE_URL } from '@/lib/site';
/** schema.org BreadcrumbList JSON-LD for the pages D3 owns (server component; absolute URLs). */
export function BreadcrumbLd({ items }: { items: { name: string; href: string }[] }) {
const ld = {
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: items.map((it, i) => ({ '@type': 'ListItem', position: i + 1, name: it.name, item: `${SITE_URL}${it.href}` })),
};
return ;
}
/** Visible breadcrumb trail matching the JSON-LD (last item is the current page). */
export function Breadcrumbs({ items }: { items: { name: string; href: string }[] }) {
return (
);
}