0
mirror of https://github.com/valentineus/popov.link.git synced 2025-07-03 16:10:26 +03:00
Files
popov.link/src/utils/schemas/websiteSchema.ts

16 lines
425 B
TypeScript
Raw Normal View History

import type { WithContext, WebSite } from "schema-dts";
export type WebsiteSchemaParams = {
readonly description: string;
readonly siteUrl: string;
readonly title: string;
};
export default ({ siteUrl, title, description }: WebsiteSchemaParams): WithContext<WebSite> => ({
"@context": "https://schema.org",
"@type": "WebSite",
"url": new URL("/", siteUrl).toString(),
"name": title,
"description": description,
});