aboutsummaryrefslogtreecommitdiff
path: root/src/utils/schemas/websiteSchema.ts
blob: bebb96323fc08bc0faac064d01001831308bb2c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import type { WithContext, WebSite } from "schema-dts";

export type WebsiteSchemaParams = {
	readonly siteUrl: string;
	readonly title: string;
};

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