Create professional demos and 3D mockups in seconds, directly in your browser
feat: add structured data support for video objects and how-to guides
CristianOlivera1b0618ef46668
diff --git a/app/[locale]/(home)/guide/page.tsx b/app/[locale]/(home)/guide/page.tsxindex a63d563..dacec39 100644--- a/app/[locale]/(home)/guide/page.tsx+++ b/app/[locale]/(home)/guide/page.tsx@@ -1,6 +1,7 @@import { getTranslations, setRequestLocale } from "next-intl/server";import type { Metadata } from "next";import InteractiveRecordingSteps from "@/app/components/ui/home/RecordingSteps";+import { StructuredData, generateHowToSchema } from "@/app/components/seo/StructuredData";import { buildPageMetadata } from "@/lib/seo";type Props = {@@ -22,10 +23,15 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {export default async function GuidePage({ params }: Props) {const { locale } = await params;setRequestLocale(locale);+ const t = await getTranslations({ locale, namespace: "recording.steps" });+ const howToSchema = generateHowToSchema(locale, (k) => t(k));return (- <div className="min-h-screen bg-black pt-12 pb-24">- <InteractiveRecordingSteps />- </div>+ <>+ <StructuredData data={howToSchema} />+ <div className="min-h-screen bg-black pt-12 pb-24">+ <InteractiveRecordingSteps />+ </div>+ </>);}\ No newline at end of filediff --git a/app/[locale]/(home)/page.tsx b/app/[locale]/(home)/page.tsxindex 633b18e..752ba6c 100644--- a/app/[locale]/(home)/page.tsx+++ b/app/[locale]/(home)/page.tsx@@ -15,7 +15,7 @@ import FAQ from "@/app/components/ui/home/FAQ";import { buildPageMetadata } from "@/lib/seo";import { getTranslations, setRequestLocale } from "next-intl/server";import HeroEditorPreview from "@/app/components/ui/home/HeroEditorPreview";-import { generateFAQSchema } from "@/app/components/seo/StructuredData";+import { generateFAQSchema, generateVideoObjectSchema } from "@/app/components/seo/StructuredData";type Props = {params: Promise<{ locale: string }>;@@ -111,6 +111,7 @@ export default async function Home({ params }: Props) {<StructuredData data={generateWebAppSchema(schemaLocale)} /><StructuredData data={generateWebSiteSchema(schemaLocale)} /><StructuredData data={generateOrganizationSchema()} />+ <StructuredData data={generateVideoObjectSchema(locale)} /><StructuredData data={faqSchema} /><div className="flex flex-col">diff --git a/app/components/seo/StructuredData.tsx b/app/components/seo/StructuredData.tsxindex 5560c92..427d52e 100644--- a/app/components/seo/StructuredData.tsx+++ b/app/components/seo/StructuredData.tsx@@ -76,8 +76,31 @@ type FAQPageSchema = {}>;};+type VideoObjectSchema = {+ "@context": "https://schema.org";+ "@type": "VideoObject";+ name: string;+ description: string;+ thumbnailUrl: string;+ uploadDate?: string;+ contentUrl?: string;+ embedUrl?: string;+ duration?: string;+ inLanguage?: string;+};++type HowToSchema = {+ "@context": "https://schema.org";+ "@type": "HowTo";+ name: string;+ description?: string;+ inLanguage?: string;+ totalTime?: string;+ step: Array<{ "@type": "HowToStep"; name: string; text: string; url?: string }>;+};+type StructuredDataProps = {- data: WebApplicationSchema | OrganizationSchema | WebSiteSchema | BreadcrumbSchema | FAQPageSchema | Record<string, unknown>;+ data: WebApplicationSchema | OrganizationSchema | WebSiteSchema | BreadcrumbSchema | FAQPageSchema | VideoObjectSchema | HowToSchema | Record<string, unknown>;};export function StructuredData({ data }: StructuredDataProps) {@@ -104,6 +127,60 @@ export function generateFAQSchema(locale: string, items: FAQItem[]): FAQPageSche};}+export function generateVideoObjectSchema(locale: string): VideoObjectSchema {+ const content: Record<string, { name: string; description: string }> = {+ es: {+ name: "OpenVid — Editor de video online con zooms cinemáticos",+ description: "Demo del editor de video online gratuito: screen recorder, zooms cinemáticos, mockups 3D y exportación HD sin marca de agua.",+ },+ en: {+ name: "OpenVid — Online video editor with cinematic zooms",+ description: "Demo of the free online video editor: screen recorder, cinematic zooms, 3D mockups and HD export without watermark.",+ },+ ru: {+ name: "OpenVid — Онлайн-редактор с кинематографическими зумами",+ description: "Демо бесплатного онлайн-редактора: запись экрана, кинематографические зумы, 3D-мокапы и HD-экспорт без водяных знаков.",+ },+ ko: {+ name: "OpenVid — 시네마틱 줌 온라인 비디오 에디터",+ description: "무료 온라인 비디오 에디터 데모: 화면 녹화, 시네마틱 줌, 3D 목업, 워터마크 없는 HD 내보내기.",+ },+ };+ const c = content[locale] ?? content.en;+ return {+ "@context": "https://schema.org",+ "@type": "VideoObject",+ name: c.name,+ description: c.description,+ thumbnailUrl: `${SEO_BASE_URL}/images/pages/preview-editor-poster.webp`,+ contentUrl: `${SEO_BASE_URL}/videos/hero/demo-preview-editor.mp4`,+ embedUrl: `${SEO_BASE_URL}/${locale}`,+ uploadDate: "2026-01-01T00:00:00+00:00",+ duration: "PT30S",+ inLanguage: locale,+ };+}++export function generateHowToSchema(+ locale: string,+ t: (key: string) => string+): HowToSchema {+ return {+ "@context": "https://schema.org",+ "@type": "HowTo",+ name: t("title"),+ description: t("subtitle"),+ inLanguage: locale,+ totalTime: "PT2M",+ step: [1, 2, 3, 4].map((n) => ({+ "@type": "HowToStep",+ name: t(`step${n}.title`),+ text: t(`step${n}.description`),+ url: `${SEO_BASE_URL}/${locale}/guide#step-${n}`,+ })),+ };+}+export function generateWebAppSchema(locale: 'es' | 'en' | 'ru' | 'ko'): WebApplicationSchema {const baseUrl = SEO_BASE_URL;diff --git a/app/sitemap.xml/route.ts b/app/sitemap.xml/route.tsindex ec57767..9a8baa0 100644--- a/app/sitemap.xml/route.ts+++ b/app/sitemap.xml/route.ts@@ -4,6 +4,7 @@ const BASE_URL = 'https://openvid.dev';const routes = [{ path: '', priority: 1.0, changeFrequency: 'weekly' },+ { path: '/guide', priority: 0.8, changeFrequency: 'weekly' },{ path: '/donate', priority: 0.7, changeFrequency: 'monthly' },{ path: '/privacy', priority: 0.5, changeFrequency: 'yearly' },{ path: '/terms', priority: 0.5, changeFrequency: 'yearly' },