aboutsummaryrefslogtreecommitdiff
path: root/src/utils/schemas/personSchema.ts
blob: 77e443d9eaf21d783b54ffa83ba5e087c045c6b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import type { Person } from "schema-dts";
import { config } from "../../config";
import { personId } from "./ids";

export type PersonSchemaParams = {
	readonly siteUrl: string;
};

export default ({ siteUrl }: PersonSchemaParams): Person => ({
	"@type": "Person",
	"@id": personId(siteUrl),
	"name": config.author.name,
	"url": config.author.url,
	"email": config.author.email,
	"image": new URL(config.og.defaultPreview, siteUrl).toString(),
	"sameAs": config.author.sameAs,
});