🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Enhance Open Graph image generation for comparison and feature pages
Bill Yanga4c8198d8df7
diff --git a/docs/src/app/[locale]/(home)/compare/cloudflare-analytics/page.tsx b/docs/src/app/[locale]/(home)/compare/cloudflare-analytics/page.tsxindex c503526fd..5655a86d6 100644--- a/docs/src/app/[locale]/(home)/compare/cloudflare-analytics/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/cloudflare-analytics/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Cloudflare is free but limited. Rybbit offers the full analytics experience. Compare features.",type: "website",url: "https://rybbit.com/compare/cloudflare-analytics",- images: [createOGImageUrl("Rybbit vs Cloudflare Analytics: Basic vs Full-Featured", "Cloudflare is free but limited. Rybbit offers the full analytics experience. Compare features.")],+ images: [createOGImageUrl("Rybbit vs Cloudflare Analytics: Basic vs Full-Featured", "Cloudflare is free but limited. Rybbit offers the full analytics experience. Compare features.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Cloudflare Analytics",description: "Free basic analytics vs full-featured platform. See the difference.",- images: [createOGImageUrl("Rybbit vs Cloudflare Analytics", "Free basic analytics vs full-featured platform. See the difference.")],+ images: [createOGImageUrl("Rybbit vs Cloudflare Analytics", "Free basic analytics vs full-featured platform. See the difference.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/cloudflare-analytics",diff --git a/docs/src/app/[locale]/(home)/compare/fathom/page.tsx b/docs/src/app/[locale]/(home)/compare/fathom/page.tsxindex 3355e1bbe..d79365564 100644--- a/docs/src/app/[locale]/(home)/compare/fathom/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/fathom/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Fathom is simple. Rybbit is simple AND powerful. Compare session replay, funnels, and more.",type: "website",url: "https://rybbit.com/compare/fathom",- images: [createOGImageUrl("Rybbit vs Fathom: More Features, Same Privacy Focus", "Fathom is simple. Rybbit is simple AND powerful. Compare session replay, funnels, and more.")],+ images: [createOGImageUrl("Rybbit vs Fathom: More Features, Same Privacy Focus", "Fathom is simple. Rybbit is simple AND powerful. Compare session replay, funnels, and more.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Fathom Analytics",description: "Privacy-first analytics compared. See which offers more value.",- images: [createOGImageUrl("Rybbit vs Fathom Analytics", "Privacy-first analytics compared. See which offers more value.")],+ images: [createOGImageUrl("Rybbit vs Fathom Analytics", "Privacy-first analytics compared. See which offers more value.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/fathom",diff --git a/docs/src/app/[locale]/(home)/compare/google-analytics/page.tsx b/docs/src/app/[locale]/(home)/compare/google-analytics/page.tsxindex 2876c9e18..c1ef5953d 100644--- a/docs/src/app/[locale]/(home)/compare/google-analytics/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/google-analytics/page.tsx@@ -13,13 +13,13 @@ export const metadata: Metadata = {"Why thousands are switching from Google Analytics to Rybbit. Open-source, cookie-free, GDPR compliant.",type: "website",url: "https://rybbit.com/compare/google-analytics",- images: [createOGImageUrl("Rybbit vs Google Analytics: The Privacy-First Alternative", "Why thousands are switching from Google Analytics to Rybbit. Open-source, cookie-free, GDPR compliant.")],+ images: [createOGImageUrl("Rybbit vs Google Analytics: The Privacy-First Alternative", "Why thousands are switching from Google Analytics to Rybbit. Open-source, cookie-free, GDPR compliant.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Google Analytics",description: "The privacy-first Google Analytics alternative. Compare features side-by-side.",- images: [createOGImageUrl("Rybbit vs Google Analytics", "The privacy-first Google Analytics alternative. Compare features side-by-side.")],+ images: [createOGImageUrl("Rybbit vs Google Analytics", "The privacy-first Google Analytics alternative. Compare features side-by-side.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/google-analytics",diff --git a/docs/src/app/[locale]/(home)/compare/matomo/page.tsx b/docs/src/app/[locale]/(home)/compare/matomo/page.tsxindex 41b2cced0..b99f66c9c 100644--- a/docs/src/app/[locale]/(home)/compare/matomo/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/matomo/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Side-by-side comparison of Rybbit and Matomo. Modern, privacy-first analytics vs legacy PHP system.",type: "website",url: "https://rybbit.com/compare/matomo",- images: [createOGImageUrl("Rybbit vs Matomo: Which Analytics Platform is Right for You?", "Side-by-side comparison of Rybbit and Matomo. Modern, privacy-first analytics vs legacy PHP system.")],+ images: [createOGImageUrl("Rybbit vs Matomo: Which Analytics Platform is Right for You?", "Side-by-side comparison of Rybbit and Matomo. Modern, privacy-first analytics vs legacy PHP system.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Matomo Comparison",description: "Compare Rybbit and Matomo analytics. See which open-source platform fits your needs.",- images: [createOGImageUrl("Rybbit vs Matomo Comparison", "Compare Rybbit and Matomo analytics. See which open-source platform fits your needs.")],+ images: [createOGImageUrl("Rybbit vs Matomo Comparison", "Compare Rybbit and Matomo analytics. See which open-source platform fits your needs.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/matomo",diff --git a/docs/src/app/[locale]/(home)/compare/page.tsx b/docs/src/app/[locale]/(home)/compare/page.tsxindex b21054500..4008abfe7 100644--- a/docs/src/app/[locale]/(home)/compare/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/page.tsx@@ -25,7 +25,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Rybbit vs The Competition",- "Side-by-side comparisons with every major analytics platform."+ "Side-by-side comparisons with every major analytics platform.",+ "Compare"),],},@@ -37,7 +38,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Rybbit vs The Competition",- "Compare Rybbit with Google Analytics, Plausible, PostHog, and more."+ "Compare Rybbit with Google Analytics, Plausible, PostHog, and more.",+ "Compare"),],},diff --git a/docs/src/app/[locale]/(home)/compare/plausible/page.tsx b/docs/src/app/[locale]/(home)/compare/plausible/page.tsxindex a99ae7a66..a827f2e89 100644--- a/docs/src/app/[locale]/(home)/compare/plausible/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/plausible/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Both respect privacy, but Rybbit offers more power. Compare session replay, funnels, and pricing.",type: "website",url: "https://rybbit.com/compare/plausible",- images: [createOGImageUrl("Rybbit vs Plausible: Which Privacy-First Analytics Wins?", "Both respect privacy, but Rybbit offers more power. Compare session replay, funnels, and pricing.")],+ images: [createOGImageUrl("Rybbit vs Plausible: Which Privacy-First Analytics Wins?", "Both respect privacy, but Rybbit offers more power. Compare session replay, funnels, and pricing.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Plausible Comparison",description: "Privacy-first analytics showdown. See which platform offers more value.",- images: [createOGImageUrl("Rybbit vs Plausible Comparison", "Privacy-first analytics showdown. See which platform offers more value.")],+ images: [createOGImageUrl("Rybbit vs Plausible Comparison", "Privacy-first analytics showdown. See which platform offers more value.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/plausible",diff --git a/docs/src/app/[locale]/(home)/compare/posthog/page.tsx b/docs/src/app/[locale]/(home)/compare/posthog/page.tsxindex 9d822c075..7af68c1ce 100644--- a/docs/src/app/[locale]/(home)/compare/posthog/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/posthog/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "PostHog does everything. Rybbit does web analytics perfectly. Compare the approaches.",type: "website",url: "https://rybbit.com/compare/posthog",- images: [createOGImageUrl("Rybbit vs PostHog: Focused Analytics vs Feature Bloat", "PostHog does everything. Rybbit does web analytics perfectly. Compare the approaches.")],+ images: [createOGImageUrl("Rybbit vs PostHog: Focused Analytics vs Feature Bloat", "PostHog does everything. Rybbit does web analytics perfectly. Compare the approaches.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs PostHog Comparison",description: "Focused web analytics vs all-in-one platform. Which approach fits your needs?",- images: [createOGImageUrl("Rybbit vs PostHog Comparison", "Focused web analytics vs all-in-one platform. Which approach fits your needs?")],+ images: [createOGImageUrl("Rybbit vs PostHog Comparison", "Focused web analytics vs all-in-one platform. Which approach fits your needs?", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/posthog",diff --git a/docs/src/app/[locale]/(home)/compare/simpleanalytics/page.tsx b/docs/src/app/[locale]/(home)/compare/simpleanalytics/page.tsxindex a3662e64f..1c8f23f8c 100644--- a/docs/src/app/[locale]/(home)/compare/simpleanalytics/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/simpleanalytics/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Simple Analytics keeps it basic. Rybbit adds power without complexity. Compare features.",type: "website",url: "https://rybbit.com/compare/simpleanalytics",- images: [createOGImageUrl("Rybbit vs Simple Analytics: Simple AND Powerful", "Simple Analytics keeps it basic. Rybbit adds power without complexity. Compare features.")],+ images: [createOGImageUrl("Rybbit vs Simple Analytics: Simple AND Powerful", "Simple Analytics keeps it basic. Rybbit adds power without complexity. Compare features.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Simple Analytics",description: "Privacy-first analytics compared. See which offers the best value.",- images: [createOGImageUrl("Rybbit vs Simple Analytics", "Privacy-first analytics compared. See which offers the best value.")],+ images: [createOGImageUrl("Rybbit vs Simple Analytics", "Privacy-first analytics compared. See which offers the best value.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/simpleanalytics",diff --git a/docs/src/app/[locale]/(home)/compare/umami/page.tsx b/docs/src/app/[locale]/(home)/compare/umami/page.tsxindex 8cb2e5c08..1dd0e9101 100644--- a/docs/src/app/[locale]/(home)/compare/umami/page.tsx+++ b/docs/src/app/[locale]/(home)/compare/umami/page.tsx@@ -12,13 +12,13 @@ export const metadata: Metadata = {description: "Two open-source analytics platforms compared. See which offers more features and flexibility.",type: "website",url: "https://rybbit.com/compare/umami",- images: [createOGImageUrl("Rybbit vs Umami: Open-Source Analytics Head-to-Head", "Two open-source analytics platforms compared. See which offers more features and flexibility.")],+ images: [createOGImageUrl("Rybbit vs Umami: Open-Source Analytics Head-to-Head", "Two open-source analytics platforms compared. See which offers more features and flexibility.", "Compare")],},twitter: {card: "summary_large_image",title: "Rybbit vs Umami Comparison",description: "Open-source analytics showdown. Compare features, hosting options, and more.",- images: [createOGImageUrl("Rybbit vs Umami Comparison", "Open-source analytics showdown. Compare features, hosting options, and more.")],+ images: [createOGImageUrl("Rybbit vs Umami Comparison", "Open-source analytics showdown. Compare features, hosting options, and more.", "Compare")],},alternates: {canonical: "https://rybbit.com/compare/umami",diff --git a/docs/src/app/[locale]/(home)/features/custom-events/page.tsx b/docs/src/app/[locale]/(home)/features/custom-events/page.tsxindex 9cc8766c0..974fb200f 100644--- a/docs/src/app/[locale]/(home)/features/custom-events/page.tsx+++ b/docs/src/app/[locale]/(home)/features/custom-events/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Custom Events",- "Track any user interaction with one line of code. Custom properties, real-time stream, autocapture."+ "Track any user interaction with one line of code. Custom properties, real-time stream, autocapture.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Custom Events",- "Track any user interaction with one line of code."+ "Track any user interaction with one line of code.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/error-tracking/page.tsx b/docs/src/app/[locale]/(home)/features/error-tracking/page.tsxindex 378214389..e5627f002 100644--- a/docs/src/app/[locale]/(home)/features/error-tracking/page.tsx+++ b/docs/src/app/[locale]/(home)/features/error-tracking/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Error Tracking",- "Automatic JavaScript error monitoring built into your analytics."+ "Automatic JavaScript error monitoring built into your analytics.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Error Tracking",- "Automatic JavaScript error monitoring built into your analytics."+ "Automatic JavaScript error monitoring built into your analytics.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/funnels/page.tsx b/docs/src/app/[locale]/(home)/features/funnels/page.tsxindex 373b795ee..76538525e 100644--- a/docs/src/app/[locale]/(home)/features/funnels/page.tsx+++ b/docs/src/app/[locale]/(home)/features/funnels/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Conversion Funnels",- "Find where users drop off. Build conversion funnels with real-time data."+ "Find where users drop off. Build conversion funnels with real-time data.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Conversion Funnels",- "Find where users drop off. Build conversion funnels with real-time data."+ "Find where users drop off. Build conversion funnels with real-time data.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/goals/page.tsx b/docs/src/app/[locale]/(home)/features/goals/page.tsxindex f10f52bcb..53384cc14 100644--- a/docs/src/app/[locale]/(home)/features/goals/page.tsx+++ b/docs/src/app/[locale]/(home)/features/goals/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Conversion Goals",- "Set conversion goals and track completions in real time."+ "Set conversion goals and track completions in real time.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Conversion Goals",- "Set conversion goals and track completions in real time."+ "Set conversion goals and track completions in real time.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/page.tsx b/docs/src/app/[locale]/(home)/features/page.tsxindex d758f0c3d..3d59a6835 100644--- a/docs/src/app/[locale]/(home)/features/page.tsx+++ b/docs/src/app/[locale]/(home)/features/page.tsx@@ -49,10 +49,10 @@ export const metadata: Metadata = createMetadata({description:"Powerful, privacy-friendly analytics features to help you understand your audience and grow your business. Real-time data, session replay, web vitals, and more.",openGraph: {- images: [createOGImageUrl("Features - Rybbit Analytics", "Powerful, privacy-friendly analytics features to help you understand your audience and grow your business.")],+ images: [createOGImageUrl("Features - Rybbit Analytics", "Powerful, privacy-friendly analytics features to help you understand your audience and grow your business.", "Features")],},twitter: {- images: [createOGImageUrl("Features - Rybbit Analytics", "Powerful, privacy-friendly analytics features to help you understand your audience and grow your business.")],+ images: [createOGImageUrl("Features - Rybbit Analytics", "Powerful, privacy-friendly analytics features to help you understand your audience and grow your business.", "Features")],},});diff --git a/docs/src/app/[locale]/(home)/features/retention/page.tsx b/docs/src/app/[locale]/(home)/features/retention/page.tsxindex 2231cff84..dcde34739 100644--- a/docs/src/app/[locale]/(home)/features/retention/page.tsx+++ b/docs/src/app/[locale]/(home)/features/retention/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Retention Analysis",- "Cohort retention analysis. See which users come back and when they stop."+ "Cohort retention analysis. See which users come back and when they stop.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Retention Analysis",- "Cohort retention analysis. See which users come back and when they stop."+ "Cohort retention analysis. See which users come back and when they stop.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/session-replay/page.tsx b/docs/src/app/[locale]/(home)/features/session-replay/page.tsxindex bf803ca3c..a22817ee0 100644--- a/docs/src/app/[locale]/(home)/features/session-replay/page.tsx+++ b/docs/src/app/[locale]/(home)/features/session-replay/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Session Replay",- "See exactly what your users do. Privacy-first session replay built into your analytics."+ "See exactly what your users do. Privacy-first session replay built into your analytics.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Session Replay",- "See exactly what your users do. Privacy-first session replay built into your analytics."+ "See exactly what your users do. Privacy-first session replay built into your analytics.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/sessions/page.tsx b/docs/src/app/[locale]/(home)/features/sessions/page.tsxindex a26c51bf5..6206aaa16 100644--- a/docs/src/app/[locale]/(home)/features/sessions/page.tsx+++ b/docs/src/app/[locale]/(home)/features/sessions/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Sessions",- "Browse individual user sessions with metadata, event timelines, and one-click filtering."+ "Browse individual user sessions with metadata, event timelines, and one-click filtering.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Sessions",- "Browse individual user sessions with metadata, event timelines, and one-click filtering."+ "Browse individual user sessions with metadata, event timelines, and one-click filtering.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/user-journeys/page.tsx b/docs/src/app/[locale]/(home)/features/user-journeys/page.tsxindex b2663fffa..2dfe4a754 100644--- a/docs/src/app/[locale]/(home)/features/user-journeys/page.tsx+++ b/docs/src/app/[locale]/(home)/features/user-journeys/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("User Journeys",- "See how users actually navigate your site with interactive Sankey flow diagrams."+ "See how users actually navigate your site with interactive Sankey flow diagrams.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("User Journeys",- "See how users actually navigate your site with interactive Sankey flow diagrams."+ "See how users actually navigate your site with interactive Sankey flow diagrams.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/user-profiles/page.tsx b/docs/src/app/[locale]/(home)/features/user-profiles/page.tsxindex 0d06e67d3..af320d11d 100644--- a/docs/src/app/[locale]/(home)/features/user-profiles/page.tsx+++ b/docs/src/app/[locale]/(home)/features/user-profiles/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("User Profiles",- "Identify users, track traits, and see their complete activity history."+ "Identify users, track traits, and see their complete activity history.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("User Profiles",- "Identify users, track traits, and see their complete activity history."+ "Identify users, track traits, and see their complete activity history.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/web-analytics/page.tsx b/docs/src/app/[locale]/(home)/features/web-analytics/page.tsxindex ff046d1a4..47c1467cf 100644--- a/docs/src/app/[locale]/(home)/features/web-analytics/page.tsx+++ b/docs/src/app/[locale]/(home)/features/web-analytics/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Web Analytics",- "Real-time, privacy-first web analytics. One script, full dashboard."+ "Real-time, privacy-first web analytics. One script, full dashboard.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Web Analytics",- "Real-time, privacy-first web analytics. One script, full dashboard."+ "Real-time, privacy-first web analytics. One script, full dashboard.",+ "Features"),],},diff --git a/docs/src/app/[locale]/(home)/features/web-vitals/page.tsx b/docs/src/app/[locale]/(home)/features/web-vitals/page.tsxindex f4dafb845..2482a50d5 100644--- a/docs/src/app/[locale]/(home)/features/web-vitals/page.tsx+++ b/docs/src/app/[locale]/(home)/features/web-vitals/page.tsx@@ -22,7 +22,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Web Vitals Monitoring",- "Real user Core Web Vitals monitoring. LCP, FID/INP, CLS with percentile analysis."+ "Real user Core Web Vitals monitoring. LCP, FID/INP, CLS with percentile analysis.",+ "Features"),],},@@ -34,7 +35,8 @@ export const metadata: Metadata = {images: [createOGImageUrl("Web Vitals Monitoring",- "Real user Core Web Vitals monitoring. LCP, FID/INP, CLS with percentile analysis."+ "Real user Core Web Vitals monitoring. LCP, FID/INP, CLS with percentile analysis.",+ "Features"),],},diff --git a/docs/src/app/og/[...slug]/route.tsx b/docs/src/app/og/[...slug]/route.tsxindex 8e4af53d9..665ffd042 100644--- a/docs/src/app/og/[...slug]/route.tsx+++ b/docs/src/app/og/[...slug]/route.tsx@@ -25,18 +25,34 @@ async function loadInterFont(}export async function GET(- _req: Request,+ req: Request,{ params }: { params: Promise<{ slug: string[] }> },) {const { slug } = await params;+ const { searchParams } = new URL(req.url);// Strip trailing "image.png" segment if presentconst pageSlug = slug[slug.length - 1] === 'image.png'? slug.slice(0, -1): slug;- const page = source.getPage(pageSlug.length > 0 ? pageSlug : undefined);- if (!page) notFound();+ let title: string;+ let description: string | undefined;+ let label: string | undefined;++ if (searchParams.has('title')) {+ // Marketing pages: data from query params+ title = searchParams.get('title')!;+ description = searchParams.get('description') ?? undefined;+ label = searchParams.get('label') ?? undefined;+ } else {+ // Docs pages: data from source+ const page = source.getPage(pageSlug.length > 0 ? pageSlug : undefined);+ if (!page) notFound();+ title = page.data.title;+ description = page.data.description;+ label = 'Docs';+ }const [interRegular, interBoldFont, logoSrc] = await Promise.all([loadInterFont(400),@@ -46,10 +62,10 @@ export async function GET(return new ImageResponse(generateOGImage({- title: page.data.title,- description: page.data.description,+ title,+ description,logoSrc,- label: 'Docs',+ label,}),{width: 1200,diff --git a/docs/src/lib/metadata.ts b/docs/src/lib/metadata.tsindex e8f3c87ae..60fb6ed8e 100644--- a/docs/src/lib/metadata.ts+++ b/docs/src/lib/metadata.ts@@ -9,11 +9,12 @@ export function getPageImage(page: Page) {};}-export function createOGImageUrl(title: string, description?: string) {+export function createOGImageUrl(title: string, description?: string, label?: string) {const params = new URLSearchParams({ title });if (description) params.set('description', description);+ if (label) params.set('label', label);return {- url: `/og-image?${params.toString()}`,+ url: `/og/image.png?${params.toString()}`,width: 1200,height: 630,};