/** * Generate a schema.org `BreadcrumbList` JSON-LD object. * * The `data` array may contain either strings or `Crumb` objects. If an * entry is a string it will be treated as a path segment and slugified when * appended to `baseUrl`. A `Crumb` object may provide an explicit `path` to * use when building the segment, or an absolute `url` to use directly. * * Output: each list item will include an `item` object with `@id` (the URL) * and `name` (the breadcrumb label). * * @param props.data - Array of path segments or Crumb objects * @param props.baseUrl - The base URL to build breadcrumb URLs from * @returns A JSON-LD `BreadcrumbList` object * @author Taimoor Khan */ interface Crumb { name: string; path?: string; url?: string; } interface Props { data: Array; baseUrl: string; } declare const generateBreadcrumbSchema: ({ data, baseUrl }: Props) => { '@context': string; '@type': string; itemListElement: { '@type': string; position: number; name: string; item: { '@id': string; name: string; }; }[]; }; export { generateBreadcrumbSchema };