feat(og): Standardize OG images across all subpages with logo and background
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user