From 34ac65c5345de34d61ff7b199e24122e51036953 Mon Sep 17 00:00:00 2001 From: Damjan Savic Date: Sun, 25 Jan 2026 06:33:19 +0100 Subject: [PATCH] auto-claude: subtask-1-4 - Extract WebPageJsonLd component --- .auto-claude-status | 6 +-- src/components/seo/schemas/WebPageJsonLd.tsx | 39 ++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 src/components/seo/schemas/WebPageJsonLd.tsx diff --git a/.auto-claude-status b/.auto-claude-status index 8ba4d58..e073a3b 100644 --- a/.auto-claude-status +++ b/.auto-claude-status @@ -3,7 +3,7 @@ "spec": "032-split-large-jsonld-tsx-component-759-lines-into-se", "state": "building", "subtasks": { - "completed": 2, + "completed": 3, "total": 19, "in_progress": 1, "failed": 0 @@ -18,8 +18,8 @@ "max": 1 }, "session": { - "number": 4, + "number": 5, "started_at": "2026-01-25T06:23:19.101802" }, - "last_update": "2026-01-25T06:31:22.524141" + "last_update": "2026-01-25T06:32:33.169444" } \ No newline at end of file diff --git a/src/components/seo/schemas/WebPageJsonLd.tsx b/src/components/seo/schemas/WebPageJsonLd.tsx new file mode 100644 index 0000000..67a0127 --- /dev/null +++ b/src/components/seo/schemas/WebPageJsonLd.tsx @@ -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 ( +