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)
65 lines
1.7 KiB
TypeScript
65 lines
1.7 KiB
TypeScript
import { Metadata } from 'next';
|
|
import { setRequestLocale } from 'next-intl/server';
|
|
import { notFound } from 'next/navigation';
|
|
import { getMdxContent } from '@/lib/mdx';
|
|
import { MDXRemote } from 'next-mdx-remote/rsc';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
// Import components used in MDX
|
|
import { HeroVideo as HomeHero } from '@/components/blocks/HeroVideo';
|
|
import { SubCompanyTiles as HomeSubCompanyTiles } from '@/components/blocks/SubCompanyTiles';
|
|
import { CompetenceBentoGrid as HomeCompetenceBentoGrid } from '@/components/blocks/CompetenceBentoGrid';
|
|
import { ReferencesSlider as HomeReferencesSlider } from '@/components/blocks/ReferencesSlider';
|
|
import { FaqBlock } from '@/components/blocks/FaqBlock';
|
|
import JsonLd from '@/components/JsonLd';
|
|
|
|
import { Button } from '@/components/ui/Button';
|
|
import { Heading } from '@/components/ui/Heading';
|
|
|
|
const mdxComponents = {
|
|
HomeHero,
|
|
HomeSubCompanyTiles,
|
|
HomeCompetenceBentoGrid,
|
|
HomeReferencesSlider,
|
|
FaqBlock,
|
|
JsonLd,
|
|
Button,
|
|
Heading,
|
|
};
|
|
|
|
export async function generateMetadata(props: any): Promise<Metadata> {
|
|
const { locale } = await props.params;
|
|
if (locale !== 'de' && locale !== 'en') return {};
|
|
|
|
const mdx = await getMdxContent(locale, 'home');
|
|
|
|
return {
|
|
title: mdx?.frontmatter?.title || (locale === 'de' ? 'Startseite' : 'Home'),
|
|
description: mdx?.frontmatter?.description,
|
|
};
|
|
}
|
|
|
|
export default async function Home(props: any) {
|
|
const { locale } = await props.params;
|
|
|
|
if (locale !== 'de' && locale !== 'en') {
|
|
notFound();
|
|
}
|
|
|
|
setRequestLocale(locale);
|
|
|
|
const mdx = await getMdxContent(locale, 'home');
|
|
|
|
if (!mdx) {
|
|
notFound();
|
|
}
|
|
|
|
return (
|
|
<main>
|
|
<MDXRemote source={mdx.content} components={mdxComponents} />
|
|
</main>
|
|
);
|
|
}
|
|
|