import { EMAIL, PHONE_E164, SITE_NAME, SITE_URL } from "@/lib/site"; /** Gemeinsame Open-Graph-Felder; Unterseiten überschreiben openGraph komplett, daher überall einbinden. */ export const OG_COMMON = { type: "website" as const, locale: "de_DE", siteName: SITE_NAME, images: [{ url: "/og", width: 1200, height: 630, alt: "MBO-Tech-IT – IT-Service in Crailsheim" }], }; const ORG_ID = `${SITE_URL}/#organization`; type Crumb = { name: string; path: string }; export function breadcrumbSchema(crumbs: Crumb[]) { return { "@context": "https://schema.org", "@type": "BreadcrumbList", itemListElement: [{ name: "Startseite", path: "/" }, ...crumbs].map((c, i) => ({ "@type": "ListItem", position: i + 1, name: c.name, item: `${SITE_URL}${c.path === "/" ? "" : c.path}`, })), }; } interface ServiceInput { name: string; description: string; path: string; /** Optional: Preis in EUR (z. B. "89") für ein Offer */ price?: string; /** true, wenn der Preis ein „ab“-Preis ist */ priceFrom?: boolean; } export function serviceSchema({ name, description, path, price, priceFrom }: ServiceInput) { return { "@context": "https://schema.org", "@type": "Service", name, description, url: `${SITE_URL}${path}`, provider: { "@id": ORG_ID }, areaServed: { "@type": "Place", name: "Crailsheim und Region Schwäbisch Hall" }, ...(price && { offers: { "@type": "Offer", priceCurrency: "EUR", ...(priceFrom ? { priceSpecification: { "@type": "PriceSpecification", priceCurrency: "EUR", minPrice: price } } : { price }), availability: "https://schema.org/InStock", }, }), }; } export function localBusinessSchema() { return { "@context": "https://schema.org", "@graph": [ { "@type": ["LocalBusiness", "ProfessionalService"], "@id": ORG_ID, name: SITE_NAME, description: "IT-Dienstleister in Crailsheim für Privat- und Geschäftskunden: WLAN und Netzwerk, Datensicherung, Zero-Trust-VPN, Nextcloud und Paperless-ngx, Familienschutz, Server und Webseiten.", url: SITE_URL, image: `${SITE_URL}/opengraph-image`, telephone: PHONE_E164, email: EMAIL, founder: { "@type": "Person", name: "Markus Butz" }, address: { "@type": "PostalAddress", streetAddress: "Mörikestr. 2", addressLocality: "Crailsheim", postalCode: "74564", addressRegion: "Baden-Württemberg", addressCountry: "DE", }, geo: { "@type": "GeoCoordinates", latitude: 49.1374, longitude: 10.0695 }, areaServed: [ { "@type": "City", name: "Crailsheim" }, { "@type": "AdministrativeArea", name: "Landkreis Schwäbisch Hall" }, { "@type": "GeoCircle", geoMidpoint: { "@type": "GeoCoordinates", latitude: 49.1374, longitude: 10.0695 }, geoRadius: "100000" }, ], knowsAbout: [ "WLAN", "Netzwerk", "Datensicherung", "Zero-Trust-VPN", "Nextcloud", "Paperless-ngx", "Docker", "Proxmox", "Hetzner Cloud", "IT-Sicherheit", "Linux", ], contactPoint: { "@type": "ContactPoint", contactType: "customer service", telephone: PHONE_E164, email: EMAIL, availableLanguage: "German", }, hasOfferCatalog: { "@type": "OfferCatalog", name: "IT-Leistungen", itemListElement: [ { "@type": "Offer", itemOffered: { "@type": "Service", name: "MBO FamilyGuard Familienschutz", url: `${SITE_URL}/pakete/familyguard` } }, { "@type": "Offer", itemOffered: { "@type": "Service", name: "Nextcloud + Paperless-ngx Dokumentenarchiv", url: `${SITE_URL}/pakete/nextcloud` } }, { "@type": "Offer", itemOffered: { "@type": "Service", name: "Zero-Trust-VPN (Netbird)", url: `${SITE_URL}/pakete/vpn` } }, { "@type": "Offer", itemOffered: { "@type": "Service", name: "IT-Leistungen für Privat- und Geschäftskunden", url: `${SITE_URL}/services` } }, ], }, }, { "@type": "WebSite", "@id": `${SITE_URL}/#website`, url: SITE_URL, name: SITE_NAME, inLanguage: "de-DE", publisher: { "@id": ORG_ID }, }, ], }; }