mirror of
https://github.com/linsa-io/linsa.git
synced 2026-02-25 11:54:59 +01:00
34 lines
887 B
TypeScript
34 lines
887 B
TypeScript
export const seo = ({
|
|
title,
|
|
description,
|
|
keywords,
|
|
image,
|
|
}: {
|
|
title: string
|
|
description?: string
|
|
image?: string
|
|
keywords?: string
|
|
}) => {
|
|
const tags = [
|
|
{ title },
|
|
{ name: "description", content: description },
|
|
{ name: "keywords", content: keywords },
|
|
{ name: "twitter:title", content: title },
|
|
{ name: "twitter:description", content: description },
|
|
{ name: "twitter:creator", content: "@LearnAnything_" },
|
|
{ name: "twitter:site", content: "@LearnAnything_" },
|
|
{ name: "og:type", content: "website" },
|
|
{ name: "og:title", content: title },
|
|
{ name: "og:description", content: description },
|
|
...(image
|
|
? [
|
|
{ name: "twitter:image", content: image },
|
|
{ name: "twitter:card", content: "summary_large_image" },
|
|
{ name: "og:image", content: image },
|
|
]
|
|
: []),
|
|
]
|
|
|
|
return tags
|
|
}
|