blob: b971e5efa6e6b51b5b330afcdf49dc5eedbfe52f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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,
});
|