diff --git a/.auto-claude-status b/.auto-claude-status index 233c928..98e7331 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": 9, + "completed": 10, "total": 19, "in_progress": 1, "failed": 0 @@ -18,8 +18,8 @@ "max": 1 }, "session": { - "number": 11, + "number": 1548, "started_at": "2026-01-25T06:23:19.101802" }, - "last_update": "2026-01-25T06:40:39.653402" + "last_update": "2026-01-25T11:16:43.611638" } \ No newline at end of file diff --git a/src/components/seo/schemas/VideoJsonLd.tsx b/src/components/seo/schemas/VideoJsonLd.tsx new file mode 100644 index 0000000..0fddfb3 --- /dev/null +++ b/src/components/seo/schemas/VideoJsonLd.tsx @@ -0,0 +1,58 @@ +import { type Locale } from '@/i18n/config'; + +// VideoObject Schema for embedded videos +interface VideoJsonLdProps { + name: string; + description: string; + thumbnailUrl: string; + uploadDate: string; + duration?: string; // ISO 8601 format, e.g., "PT1M30S" + contentUrl?: string; + embedUrl?: string; + locale: Locale; +} + +export function VideoJsonLd({ + name, + description, + thumbnailUrl, + uploadDate, + duration, + contentUrl, + embedUrl, + locale, +}: VideoJsonLdProps) { + const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://damjan-savic.com'; + + const schema: Record = { + '@context': 'https://schema.org', + '@type': 'VideoObject', + name: name, + description: description, + thumbnailUrl: thumbnailUrl.startsWith('http') ? thumbnailUrl : `${baseUrl}${thumbnailUrl}`, + uploadDate: uploadDate, + inLanguage: locale === 'de' ? 'de-DE' : locale === 'sr' ? 'sr-RS' : 'en-US', + author: { + '@id': `${baseUrl}/#person`, + }, + }; + + if (duration) { + schema.duration = duration; + } + + if (contentUrl) { + schema.contentUrl = contentUrl; + } + + if (embedUrl) { + schema.embedUrl = embedUrl; + } + + return ( +