Files
klz-cables.com/lib/schema.ts
Marc Mintel ec3f9d5c8e
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Failing after 1m17s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
fix: explicit cast SITE_URL to string to unblock build
2026-02-10 23:58:02 +01:00

32 lines
1021 B
TypeScript

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