mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-27 10:47:14 +02:00
Move to TanStack Start from Next.js (#184)
This commit is contained in:
33
web/app/lib/utils/seo.ts
Normal file
33
web/app/lib/utils/seo.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
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: "@tannerlinsley" },
|
||||
{ name: "twitter:site", content: "@tannerlinsley" },
|
||||
{ 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
|
||||
}
|
||||
Reference in New Issue
Block a user