The file validation is based on Zod. When an invalid file is
detected, it will throw an error immediately.
To customise the schemas, you have to install zod
.
Now you can override or extend the default zod schemas with the schema
option.
Extend the default frontmatter schema:
Thanks to the Typescript magic, your custom Zod schema type should be automatically inferred.
Infer the type of pages and meta files with build-in type helpers of Source API.