auto-claude: subtask-1-4 - Extract WebPageJsonLd component
This commit is contained in:
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
"spec": "032-split-large-jsonld-tsx-component-759-lines-into-se",
|
"spec": "032-split-large-jsonld-tsx-component-759-lines-into-se",
|
||||||
"state": "building",
|
"state": "building",
|
||||||
"subtasks": {
|
"subtasks": {
|
||||||
"completed": 2,
|
"completed": 3,
|
||||||
"total": 19,
|
"total": 19,
|
||||||
"in_progress": 1,
|
"in_progress": 1,
|
||||||
"failed": 0
|
"failed": 0
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
"max": 1
|
"max": 1
|
||||||
},
|
},
|
||||||
"session": {
|
"session": {
|
||||||
"number": 4,
|
"number": 5,
|
||||||
"started_at": "2026-01-25T06:23:19.101802"
|
"started_at": "2026-01-25T06:23:19.101802"
|
||||||
},
|
},
|
||||||
"last_update": "2026-01-25T06:31:22.524141"
|
"last_update": "2026-01-25T06:32:33.169444"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import { type Locale } from '@/i18n/config';
|
||||||
|
|
||||||
|
export function WebPageJsonLd({
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
url,
|
||||||
|
locale,
|
||||||
|
}: {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
url: string;
|
||||||
|
locale: Locale;
|
||||||
|
}) {
|
||||||
|
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://damjan-savic.com';
|
||||||
|
|
||||||
|
const schema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'WebPage',
|
||||||
|
name: title,
|
||||||
|
description: description,
|
||||||
|
url: url.startsWith('http') ? url : `${baseUrl}${url}`,
|
||||||
|
inLanguage: locale === 'de' ? 'de-DE' : locale === 'sr' ? 'sr-RS' : 'en-US',
|
||||||
|
isPartOf: {
|
||||||
|
'@type': 'WebSite',
|
||||||
|
name: 'Damjan Savić',
|
||||||
|
url: baseUrl,
|
||||||
|
},
|
||||||
|
author: {
|
||||||
|
'@id': `${baseUrl}/#person`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user