diff options
Diffstat (limited to 'src/utils/schemas/personSchema.ts')
| -rw-r--r-- | src/utils/schemas/personSchema.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/utils/schemas/personSchema.ts b/src/utils/schemas/personSchema.ts new file mode 100644 index 0000000..77e443d --- /dev/null +++ b/src/utils/schemas/personSchema.ts @@ -0,0 +1,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, +}); |
