Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 1m20s
Build & Deploy / 🏗️ Build (push) Successful in 7m10s
Build & Deploy / 🚀 Deploy (push) Successful in 38s
Build & Deploy / 🧪 Smoke Test (push) Failing after 42s
Build & Deploy / 🔔 Notify (push) Successful in 2s
- Replaced corrupted HTML font files with binary WOFF2 versions. - Updated all opengraph-image.tsx files to await params, as required by Next.js 15+. - Improved OG image reliability by using SITE_URL for absolute image paths. - Added scripts/check-og-images.ts for automated production verification. - Integrated smoke_test job into deployment pipeline.
24 lines
761 B
TypeScript
24 lines
761 B
TypeScript
import { ImageResponse } from 'next/og';
|
|
import { getTranslations } from 'next-intl/server';
|
|
import { OGImageTemplate } from '@/components/OGImageTemplate';
|
|
import { getOgFonts, OG_IMAGE_SIZE } from '@/lib/og-helper';
|
|
|
|
export const runtime = 'nodejs';
|
|
|
|
export default async function Image({ params }: { params: Promise<{ locale: string }> }) {
|
|
const { locale } = await params;
|
|
const t = await getTranslations({ locale, namespace: 'Contact' });
|
|
const fonts = await getOgFonts();
|
|
|
|
const title = t('meta.title') || t('title');
|
|
const description = t('meta.description') || t('subtitle');
|
|
|
|
return new ImageResponse(
|
|
<OGImageTemplate title={title} description={description} label="Contact" />,
|
|
{
|
|
...OG_IMAGE_SIZE,
|
|
fonts,
|
|
},
|
|
);
|
|
}
|