mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 00:20:26 +03:00
14 lines
352 B
TypeScript
14 lines
352 B
TypeScript
|
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,
|
||
|
});
|