Validation
Validate your files via Zod
Usage
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 by passing a validate
options to the fromMap
function.
Example
Extend the default frontmatter schema:
Typescript
Notice that the default type bindings of page and meta file won't be updated
automatically, you should override it with declare
.
Last updated on