feat: comprehensive SEO system with keywords and schema markup

- Add 4-locale keyword configurations (SR, EN, DE, FR)
- Create schema generators (Product, Organization, Breadcrumb)
- Add React components for JSON-LD rendering
- Implement caching for keyword performance
- Abstract all SEO logic for maintainability
This commit is contained in:
Unchained
2026-03-30 11:22:44 +02:00
parent 767afac606
commit 234b1f1739
17 changed files with 1957 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import Script from 'next/script';
import { SchemaType } from '@/lib/seo/schema/types';
interface JsonLdProps {
data: SchemaType | SchemaType[];
}
/**
* React component to render JSON-LD schema markup
* Uses Next.js Script component for proper loading
*
* @param data - Single schema object or array of schemas
* @returns Script component with JSON-LD
* @example
* <JsonLd data={productSchema} />
* <JsonLd data={[productSchema, breadcrumbSchema]} />
*/
export function JsonLd({ data }: JsonLdProps) {
// Handle single schema or array
const schemas = Array.isArray(data) ? data : [data];
return (
<>
{schemas.map((schema, index) => (
<Script
key={index}
id={`json-ld-${index}`}
type="application/ld+json"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: JSON.stringify(schema),
}}
/>
))}
</>
);
}
export default JsonLd;