Files
klz-cables.com/lib/schema.ts
2026-01-23 12:09:23 +01:00

34 lines
960 B
TypeScript

import { getTranslations } from 'next-intl/server';
export const SITE_URL = 'https://klz-cables.com';
export const LOGO_URL = `${SITE_URL}/logo.png`;
export const getOrganizationSchema = () => ({
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'KLZ Cables',
url: SITE_URL,
logo: LOGO_URL,
sameAs: [
'https://www.linkedin.com/company/klz-cables',
],
contactPoint: {
'@type': 'ContactPoint',
telephone: '+49-881-92537298',
contactType: 'customer service',
email: 'info@klz-vertriebs-gmbh.com',
availableLanguage: ['German', 'English']
}
});
export const getBreadcrumbSchema = (items: { name: string; item: string }[]) => ({
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: items.map((item, index) => ({
'@type': 'ListItem',
position: index + 1,
name: item.name,
item: item.item.startsWith('http') ? item.item : `${SITE_URL}${item.item}`,
})),
});