og
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 1m47s

This commit is contained in:
2026-01-31 10:21:24 +01:00
parent e4eabd7a86
commit 0f5811edb9
11 changed files with 67 additions and 15 deletions

View File

@@ -2,9 +2,10 @@ import { Metadata } from 'next';
import { SITE_URL } from './schema';
export function getOGImageMetadata(path: string, title: string, locale: string): NonNullable<Metadata['openGraph']>['images'] {
const cleanPath = path ? (path.startsWith('/') ? path : `/${path}`) : '';
return [
{
url: `${SITE_URL}/${locale}/${path}/opengraph-image`,
url: `${SITE_URL}/${locale}${cleanPath}/opengraph-image`,
width: 1200,
height: 630,
alt: title,