mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
34 lines
811 B
Plaintext
34 lines
811 B
Plaintext
---
|
|
import { AstroSeo } from '@astrolib/seo';
|
|
import { type Tool } from '../constants/tools';
|
|
import { getStrings } from '../core/i18n/getStrings';
|
|
|
|
interface Props {
|
|
tool: Tool;
|
|
}
|
|
|
|
const { tool } = Astro.props;
|
|
const { locale } = Astro.params;
|
|
const strings = getStrings(locale);
|
|
const toolStrings =
|
|
strings.website.tools[
|
|
(tool.stringsId ?? tool.id) as keyof typeof strings.website.tools
|
|
];
|
|
---
|
|
|
|
<AstroSeo
|
|
title={toolStrings.name}
|
|
description={toolStrings.seo_description}
|
|
canonical={Astro.url.href}
|
|
openGraph={{
|
|
url: Astro.url.href,
|
|
images: [
|
|
{ url: `${Astro.url.origin}/assets/images/tools/${tool.id}.webp` },
|
|
],
|
|
title: toolStrings.name,
|
|
description: toolStrings.seo_description,
|
|
site_name: 'BlitzKit',
|
|
}}
|
|
twitter={{ cardType: 'summary_large_image' }}
|
|
/>
|