Files
e-tib.com/lib/schema.ts
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

37 lines
1.1 KiB
TypeScript

import { config } from './config';
const getSiteUrl = () => {
if (process.env.CI) return 'http://etib.localhost';
return (config.baseUrl as string) || 'https://e-tib.com';
};
export const SITE_URL = getSiteUrl();
export const LOGO_URL = `${SITE_URL}/assets/logo.png`;
export const getOrganizationSchema = () => ({
'@context': 'https://schema.org' as const,
'@type': 'Organization' as const,
name: 'E-TIB GmbH',
url: SITE_URL,
logo: LOGO_URL,
sameAs: ['https://www.instagram.com/me.and.eloise/'],
contactPoint: {
'@type': 'ContactPoint' as const,
telephone: '+49-15207230518',
contactType: 'customer service' as const,
email: 'd.joseph@e-tib.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}`,
})),
});