fix: opengraph gen
This commit is contained in:
@@ -23,11 +23,14 @@ export async function GET(req: NextRequest) {
|
||||
font-family: sans-serif;
|
||||
position: relative;
|
||||
">
|
||||
<img src="${imageUrl}" style="object-fit: cover; width:100%; height:100%; opacity:0.6; position:absolute; left:0; top:0;" />
|
||||
<img src="${logoUrl}" style="width: 288px; height: 89px; position:absolute; left:20px; top:20px;" />
|
||||
<div style="position: absolute; top: 110px; left: 280px; width:100%; height:100%;">
|
||||
<h2 style="color: white; font-family: sans-serif; font-size: 42px">${title}</h2>
|
||||
<p style="color: white; font-family: sans-serif; font-size: 24px">${desc}</p>
|
||||
<img src="${imageUrl}" style="object-fit: cover; width:100%; height:100%; opacity:0.5; position:absolute; left:0; top:0;" />
|
||||
<img src="${logoUrl}" style="width: 288px; height: 89px; position:absolute; left:10px; top:20px;" />
|
||||
<p style="position: absolute; top: 24px; right:20px; color: white; font-family: Arial, Helvetica, sans-serif; font-size: 24px; ">
|
||||
☏ +7 (900) 241-34-34
|
||||
</p>
|
||||
<div style="position: absolute; top: 140px; left: 20px; width:100%; height:100%;">
|
||||
<h2 style="color: white; font-family: Arial, Helvetica, sans-serif; font-size: 40px; line-height: 1;">${title}</h2>
|
||||
<p style="color: white; font-family: Arial, Helvetica, sans-serif; font-size: 24px; line-height: 1;">${desc}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,40 +1,48 @@
|
||||
import { Home } from '@/views';
|
||||
import type { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Независимая оценка и судебная экспертиза | Компания ДИТРАСО',
|
||||
const metainfo = {
|
||||
title: 'Независимая оценка и судебная экспертиза',
|
||||
description:
|
||||
'Услуги независимой оценки и судебной экспертизы в Сочи и Краснодаре. Тел. +7 (900) 241-34-34',
|
||||
'Услуги независимой оценки и судебной экспертизы в Сочи и Краснодаре.',
|
||||
companyName: 'Компания ДИТРАСО',
|
||||
phone: '+7 (900) 241-34-34',
|
||||
url: 'https://ocenka-sochi.ru',
|
||||
ogImageTitle: 'Оценка и экспертиза',
|
||||
ogImageDescription: 'Независимая оценка и судебная экспертиза',
|
||||
};
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: `${metainfo.title} | ${metainfo.companyName}`,
|
||||
description: `${metainfo.description} ${metainfo.phone}`,
|
||||
openGraph: {
|
||||
title: 'Независимая оценка и судебная экспертиза - Компания ДИТРАСО',
|
||||
description:
|
||||
'Услуги независимой оценки и судебной экспертизы в Сочи и Краснодаре. Тел. +7 (900) 241-34-34',
|
||||
url: 'https://ocenka-sochi.ru',
|
||||
title: metainfo.title,
|
||||
description: metainfo.description,
|
||||
url: metainfo.url,
|
||||
images: [
|
||||
{
|
||||
url: 'https://ocenka-sochi.ru/images/about.jpg',
|
||||
secureUrl: 'https://ocenka-sochi.ru/images/about.jpg',
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: 'Независимая оценка и судебная экспертиза - Компания ДИТРАСО',
|
||||
url: `${metainfo.url}/api/og/?title=${metainfo.title}&description=${metainfo.description}`,
|
||||
secureUrl: `${metainfo.url}/api/og/?title=${metainfo.title}&description=${metainfo.description}`,
|
||||
width: 600,
|
||||
height: 315,
|
||||
alt: `${metainfo.title} - ${metainfo.companyName}`,
|
||||
},
|
||||
],
|
||||
locale: 'ru_RU',
|
||||
type: 'website',
|
||||
siteName: 'Независимая оценка и судебная экспертиза - Компания ДИТРАСО',
|
||||
siteName: `${metainfo.title} - ${metainfo.companyName}`,
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: 'Независимая оценка и судебная экспертиза - Компания ДИТРАСО',
|
||||
description:
|
||||
'Услуги независимой оценки и судебной экспертизы в Сочи и Краснодаре. Тел. +7 (900) 241-34-34',
|
||||
creator: '@author_here',
|
||||
title: `${metainfo.title} - ${metainfo.companyName}`,
|
||||
description: `${metainfo.description} ${metainfo.phone}`,
|
||||
creator: '@ditraso',
|
||||
images: [
|
||||
{
|
||||
url: 'https://ocenka-sochi.ru/images/about.jpg',
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: 'Независимая оценка и судебная экспертиза - Компания ДИТРАСО',
|
||||
url: `${metainfo.url}/api/og/?title=${metainfo.title}&description=${metainfo.description}`,
|
||||
width: 600,
|
||||
height: 315,
|
||||
alt: `${metainfo.title} - ${metainfo.companyName}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user