0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-29 01:28:59 -05:00
pingvin-share/frontend/src/components/Meta.tsx

30 lines
669 B
TypeScript
Raw Normal View History

2022-04-28 15:31:37 +02:00
import Head from "next/head";
2022-05-05 11:22:47 +02:00
const Meta = ({
title,
description,
}: {
title: string;
description?: string;
}) => {
const metaTitle = `${title} - Pingvin Share`;
2022-04-28 15:31:37 +02:00
return (
<Head>
<title>{metaTitle}</title>
<meta name="og:title" content={metaTitle} />
2022-05-05 11:22:47 +02:00
<meta
name="og:description"
content={
2022-05-12 16:13:16 +02:00
description ?? "An open-source and self-hosted sharing platform."
2022-05-05 11:22:47 +02:00
}
/>
<meta property="og:image" content="/img/opengraph-default.png" />
<meta name="twitter:title" content={metaTitle} />
2022-05-05 11:22:47 +02:00
<meta name="twitter:description" content={description} />
2022-04-28 15:31:37 +02:00
</Head>
);
};
export default Meta;