feat(og): Standardize OG images across all subpages with logo and background

This commit is contained in:
2026-06-22 13:46:50 +02:00
parent 3202139b1e
commit 0378dde328
6 changed files with 52 additions and 28 deletions

View File

@@ -11,13 +11,9 @@ export default async function Image({ params }: { params: Promise<{ locale: stri
const { locale } = await params;
const t = await getTranslations({ locale, namespace: 'Index.meta' });
let title = t('title');
if (title.startsWith('E-TIB GmbH | ')) {
title = title.substring('E-TIB GmbH | '.length);
}
let description = t('description');
if (description.length > 160) {
description = description.substring(0, 160) + '...';
let pageTitle = t('title');
if (pageTitle.startsWith('E-TIB GmbH | ')) {
pageTitle = pageTitle.substring('E-TIB GmbH | '.length);
}
const fonts = await getOgFonts();
@@ -26,8 +22,8 @@ export default async function Image({ params }: { params: Promise<{ locale: stri
return new ImageResponse(
<OGImageTemplate
title={title}
description={description}
title="Die Experten für Kabelnetzbau"
description={pageTitle}
label="Kabelnetzbau & Infrastruktur"
image={bg}
logo={logo}