deploy
Some checks failed
Build & Deploy KLZ Cables / deploy (push) Has been cancelled

This commit is contained in:
2026-01-25 17:51:28 +01:00
parent a4c926ceb1
commit 3b03572fb0
6 changed files with 105 additions and 53 deletions

View File

@@ -1,16 +1,44 @@
import Script from 'next/script';
import { Organization, WebSite, WithContext } from 'schema-dts';
interface JsonLdProps {
id?: string;
data: any;
}
export default function JsonLd() {
const organizationJsonLd: WithContext<Organization> = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'KLZ Cables',
url: 'https://klz-cables.com',
logo: 'https://klz-cables.com/logo-blue.svg',
sameAs: [
'https://www.linkedin.com/company/klz-cables',
],
description: 'Premium Cable Solutions for Renewable Energy and Infrastructure.',
address: {
'@type': 'PostalAddress',
addressCountry: 'DE',
},
};
const websiteJsonLd: WithContext<WebSite> = {
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'KLZ Cables',
url: 'https://klz-cables.com',
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://klz-cables.com/search?q={search_term_string}',
},
// @ts-ignore - schema-dts might not have this specific property but it's valid for Google
'query-input': 'required name=search_term_string',
} as any,
};
export default function JsonLd({ id, data }: JsonLdProps) {
return (
<Script
id={id || `jsonld-${Math.random().toString(36).substr(2, 9)}`}
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
dangerouslySetInnerHTML={{
__html: JSON.stringify([organizationJsonLd, websiteJsonLd]),
}}
/>
);
}