feat(seo): implement AI SEO and structured data schema
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 49s
Build & Deploy / 🧪 QA (push) Successful in 2m27s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m28s
Build & Deploy / 🏗️ Build (push) Successful in 3m13s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 49s
Build & Deploy / 🧪 QA (push) Successful in 2m27s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m28s
Build & Deploy / 🏗️ Build (push) Successful in 3m13s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
- Add robust JSON-LD schema generators (LocalBusiness, FAQ, Service, Event) - Refactor JsonLd component to use @graph pattern for merging global/local schemas - Create FaqBlock component with automatic FAQPage schema injection - Inject specific JSON-LD schemas into mdx pages (home, kompetenzen, messen) - Add structured AI SEO content (hard facts, stats, clear definitions)
This commit is contained in:
@@ -34,3 +34,85 @@ export const getBreadcrumbSchema = (items: { name: string; item: string }[]) =>
|
||||
item: item.item.startsWith('http') ? item.item : `${SITE_URL}${item.item}`,
|
||||
})),
|
||||
});
|
||||
|
||||
export const getLocalBusinessSchema = () => ({
|
||||
'@context': 'https://schema.org' as const,
|
||||
'@type': 'LocalBusiness' as const,
|
||||
name: 'E-TIB GmbH',
|
||||
url: SITE_URL,
|
||||
logo: LOGO_URL,
|
||||
image: LOGO_URL,
|
||||
description: 'Ihr Partner für Kabelleitungstiefbau, Horizontalspülbohrungen, Planung und Vermessung in Guben und überregional.',
|
||||
telephone: '+49-15207230518',
|
||||
email: 'd.joseph@e-tib.com',
|
||||
address: {
|
||||
'@type': 'PostalAddress' as const,
|
||||
streetAddress: 'Gewerbestraße 22',
|
||||
addressLocality: 'Guben',
|
||||
postalCode: '03172',
|
||||
addressCountry: 'DE',
|
||||
},
|
||||
geo: {
|
||||
'@type': 'GeoCoordinates' as const,
|
||||
latitude: 51.9547, // Approx coordinates for Guben area
|
||||
longitude: 14.7175,
|
||||
},
|
||||
openingHoursSpecification: [
|
||||
{
|
||||
'@type': 'OpeningHoursSpecification' as const,
|
||||
dayOfWeek: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
|
||||
opens: '08:00',
|
||||
closes: '17:00',
|
||||
},
|
||||
],
|
||||
sameAs: ['https://www.instagram.com/me.and.eloise/'],
|
||||
});
|
||||
|
||||
export const getFAQSchema = (questions: { question: string; answer: string }[]) => ({
|
||||
'@context': 'https://schema.org' as const,
|
||||
'@type': 'FAQPage' as const,
|
||||
mainEntity: questions.map((q) => ({
|
||||
'@type': 'Question' as const,
|
||||
name: q.question,
|
||||
acceptedAnswer: {
|
||||
'@type': 'Answer' as const,
|
||||
text: q.answer,
|
||||
},
|
||||
})),
|
||||
});
|
||||
|
||||
export const getServiceSchema = (serviceName: string, description: string, image?: string) => ({
|
||||
'@context': 'https://schema.org' as const,
|
||||
'@type': 'Service' as const,
|
||||
name: serviceName,
|
||||
description: description,
|
||||
provider: {
|
||||
'@type': 'Organization' as const,
|
||||
name: 'E-TIB GmbH',
|
||||
},
|
||||
...(image && { image }),
|
||||
});
|
||||
|
||||
export const getEventSchema = (event: { name: string; startDate: string; endDate?: string; locationName: string; locationAddress?: string; url?: string }) => ({
|
||||
'@context': 'https://schema.org' as const,
|
||||
'@type': 'Event' as const,
|
||||
name: event.name,
|
||||
startDate: event.startDate,
|
||||
...(event.endDate && { endDate: event.endDate }),
|
||||
location: {
|
||||
'@type': 'Place' as const,
|
||||
name: event.locationName,
|
||||
...(event.locationAddress && {
|
||||
address: {
|
||||
'@type': 'PostalAddress' as const,
|
||||
streetAddress: event.locationAddress,
|
||||
},
|
||||
}),
|
||||
},
|
||||
organizer: {
|
||||
'@type': 'Organization' as const,
|
||||
name: 'E-TIB GmbH',
|
||||
url: SITE_URL,
|
||||
},
|
||||
...(event.url && { url: event.url }),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user