web3.news/app/lib/meta.ts

19 lines
499 B
TypeScript
Raw Normal View History

2023-12-27 12:19:03 +00:00
import OGImage from "../images/og_default.png";
export function generateMetaTags(
title: string,
description: string,
imageUrl = OGImage,
ogType: "website" | "article" = "website"
) {
return [
2023-12-27 15:43:22 +00:00
{ title },
2023-12-27 12:19:03 +00:00
{ name: "title", content: title },
{ name: "description", content: description },
{ name: "og:title", content: title },
{ name: "og:description", content: description },
{ name: "og:image", content: imageUrl },
{ name: "og:type", content: ogType },
];
}